CabCon

Head Administrator
Staff member
Head Staff Team
Messages
5,092
Reaction score
2,881
Points
1,103
Hello everyone,
here you will find a List of all CabConCommunity´s GSC Scripts for BO2. Of course feel free to use, but give Credtis. Also post your new Scripts below.

Generell Scripts

[ZM/MP] CabCon´s Dvar Editor
This Script is by: @CabCon
PHP:
////////////////////////////////////////////////////////
//////////////////////DVAR_EDITOR/////BY_CABCON/////////
////////////////////////////////////////////////////////
dvar_cg_fov()//TODO :field of view editor
{
self EditorDvarCabCon(160,0,"cg_fov",1,65);
}
dvar_g_speed()//TODO :movment speed editor
{
self EditorDvarCabCon(1000,0,"g_speed",10,190);
}
dvar_cg_gun_x()//TODO :gun x editor
{
self EditorDvarCabCon(10,-0.1,"cg_gun_x",0.2,0);
}
dvar_cg_gun_y()//TODO :gun y editor
{
self EditorDvarCabCon(10,-0.1,"cg_gun_y",0.2,0);
}
dvar_cg_gun_z()//TODO :gun z editor
{
self EditorDvarCabCon(10,-0.1,"cg_gun_z",0.2,0);
}
dvar_bg_gravity()//TODO :gravity editor
{
self EditorDvarCabCon(1500,0,"bg_gravity",10,800);
}
dvar_r_skyColorTemp()//TODO :skycolor editor VERY NICE  !
{
self EditorDvarCabCon(8500,1600,"r_skyColorTemp",50,6500);
}
dvar_timescale()//TODO :timescale editor
{
self EditorDvarCabCon(3,0.1,"timescale",.1,1);
}
dvar_r_blur()//TODO :blur editor
{
self EditorDvarCabCon(15,-0.1,"r_blur",.1,0);
}

dvar_player_meleeRange()//TODO :meleeRange editor
{
self EditorDvarCabCon(1000,-0.1,"player_meleeRange",10,55);
}

EditorDvarCabCon(max,min,dvar,value_add,default)
{
        self notify( "cabcon_stop_thread" );
        self endon( "cabcon_stop_thread" );
        self endon( "disconnect" );
        self.dvareditormax = max;
        //TODO : close function of your menu
        self iprintln("Press ^2[{+frag}]^7 to set Dvar default");//TODO :print buttons to control
        self iprintln("Press ^2[{+melee}] ^7to close Dvar Editor");//TODO :print buttons to control
        self iprintln("Press ^2[{+attack}]^7/^2[{+speed_throw}]^7 to Change Dvar");//TODO :print buttons to control
        self iprintln("By ^2CabCon");
        self.dvareditor = getDvarint(dvar);
        if ( !isDefined( self.firsttimeEditor ))
        {
        x = 80;
        y = 40;
        self.hud_cabcon_bar = newclienthudelem( self );
        self.hud_cabcon_bar.y = y + 2;
        self.hud_cabcon_bar.alignx = "left";
        self.hud_cabcon_bar.aligny = "top";
        self.hud_cabcon_bar.horzalign = "fullscreen";
        self.hud_cabcon_bar.vertalign = "fullscreen";
        self.hud_cabcon_bar.background = 1;
        self.hud_cabcon_bar setshader( "white", 1, 8 );
        self.hud_cabcon_bar.color = (1,1,1);
        self.hud_cabcon_bar_2 = newclienthudelem( self );
        self.hud_cabcon_bar_2.y = y + 2;
        self.hud_cabcon_bar_2.alignx = "left";
        self.hud_cabcon_bar_2.aligny = "top";
        self.hud_cabcon_bar_2.horzalign = "fullscreen";
        self.hud_cabcon_bar_2.vertalign = "fullscreen";
        self.hud_cabcon_bar_2.foreground = 1;
        self.hud_cabcon_bar_2 setshader( "white", 1, 8 );
        self.hud_cabcon_string = newclienthudelem( self );
        self.hud_cabcon_string.y = y + 10;
        self.hud_cabcon_string.alignx = "left";
        self.hud_cabcon_string.aligny = "top";
        self.hud_cabcon_string.horzalign = "fullscreen";
        self.hud_cabcon_string.vertalign = "fullscreen";
        self.hud_cabcon_string.fontscale = 1;
        self.hud_cabcon_string.foreground = 1;
        self.hud_cabcon_string.x = x + 80;
        self.hud_cabcon_bar_2.x = x + 80;
        self.hud_cabcon_bar.x = x + 80;
        self.firsttimeEditor = false;
        self.hud_cabcon_string.alpha = 0;
        self.hud_cabcon_bar_2.alpha = 0;
        self.hud_cabcon_bar.alpha = 0;
        }
        // self.hud_cabcon_bar_2.color = level.glowcolor; set menu color here to same color that editor
        self.hud_cabcon_bar_2.color = (1,0,0);
        self.hud_cabcon_string elemFade(.5,1);
        self.hud_cabcon_bar_2 elemFade(.5,1);
        self.hud_cabcon_bar elemFade(.5,.8);
        self.hud_cabcon_bar setshader( "white", 300, 8 );
        for( ;; )
        {
                if(self AttackButtonPressed())self.dvareditor +=value_add ;
                if(self AdsButtonPressed())self.dvareditor -=value_add ;
                if (self.dvareditor <= min )
                {
                self.dvareditor = self.dvareditormax;
                }
                if (self.dvareditor >= self.dvareditormax + 0.001 )
                {
                self.dvareditor = min;
                }
                wait 0.001;
                width = ( self.dvareditor / self.dvareditormax ) * 300;
                width = int( max( width, 1 ) );
                self.hud_cabcon_bar_2 setshader( "white", width, 8 );
                self.hud_cabcon_string setvalue( self.dvareditor );
                setdvar(dvar,self.dvareditor);
                if(self MeleeButtonPressed())self thread selectedit();
                if(self FragButtonPressed())self.dvareditor = default;
        }

}

selectedit()
{
self notify( "cabcon_stop_thread" );
self.hud_cabcon_string elemFade(.5,0);
self.hud_cabcon_bar_2 elemFade(.5,0);
self.hud_cabcon_bar elemFade(.5,0);
wait .4;
}

elemFade(time,alpha)
{
        self fadeOverTime(time);
        self.alpha=alpha;
}
////////////////////////////////////////////////////////
//////////////////////END_DVAREDITOR////////////////////
////////////////////////////////////////////////////////

[ZM/MP] Color System
This Script is by: @CabCon

PHP:
////////////////////////////////////////////////////////
//////////COLOR_SYSTEM//CREATED_BY_CABCON///////////////
////////////////////////////////////////////////////////


StartUp()
{
    self endon("EndOfEdit");

    //TODO :Do here your close function from your menu :D (Close menu at start)

    null = 0;
    Selection_1= 0;
    Selection_2= 0;
    Selection_3= 0;
    newTag= .1;
    self iprintln("Press ^2[{+frag}]^7 to Scroll Down"); //TODO :print buttons to control
    self iprintln("Press ^2[{+attack}]^7/^2[{+speed_throw}]^7 to Change Value of Color"); //TODO :print buttons to control
    self iprintln("Press ^2[{+melee}]^7 to exit Editor"); //TODO :print buttons to control
    self.RPG_1=true;self.RPG_2=false;self.RPG_3=false;main_selection=2;selection_max = 1.1; selection_min = -0.1;
    self.color_box = newclienthudelem( self );
    self.color_box.alignx = "left";
    self.color_box.aligny = "top";
    self.color_box.y = 110;
    self.color_box.x = 100;
    self.color_box elemFade(.5,1);
    self.color_box.foreground = 1;
    self.color_box setshader( "white", 30, 30 );
    self.color_box.color =(0,0,0);
    self.color_box elemMoveX(.5,220);
    self.color_box elemFade(.5,1);
    self CreateValue();
    self.debug_value_text[1] setValue(Selection_1);
    self.debug_value_text[2] setValue(Selection_2);
    self.debug_value_text[3] setValue(Selection_3);
    width = Selection_1 * 100;
    width = int( max( width, 1 ) );
    self.debug_health_box_value[1] setshader( "white", width, 10 );
    self.debug_health_box_value[2] setshader( "white", width, 10 );
    self.debug_health_box_value[3] setshader( "white", width, 10 );
    wait .5;
    self.debug_value_text[3] elemFade(.5,.7);self.debug_value_text[2] elemFade(.5,.7);self.debug_value_text[1] elemFade(.5,1);
    self.debug_health_box[3] elemFade(.5,.7);self.debug_health_box[2] elemFade(.5,.7);self.debug_health_box[1] elemFade(.5,1);
    wait .5;
    for(;;)
    {
        if(self.RPG_1==true)
        {
            Selection_1_before=Selection_1;
            if(self AttackButtonPressed())Selection_1 +=newTag ;
            if(self AdsButtonPressed())Selection_1 -=newTag ;
            if(Selection_1==selection_max)Selection_1=0;
            if(Selection_1==selection_min)Selection_1=1;
            self.color_box.color = (Selection_1,Selection_2,Selection_3);
            if(Selection_1_before!=Selection_1)
            {
                    self.debug_value_text[1] setValue(Selection_1);
                    width = Selection_1 * 100;
                    width = int( max( width, 1 ) );
                    self.debug_health_box_value[1] setshader( "white", width, 10 );
            }
        }
        if(self.RPG_2==true)
        {
            Selection_2_before=Selection_2;
            if(self AttackButtonPressed())Selection_2 +=newTag ;
            if(self AdsButtonPressed())Selection_2 -=newTag ;
            if(Selection_2==selection_max)Selection_2=0;
            if(Selection_2==selection_min)Selection_2=1;
            self.color_box.color = (Selection_1,Selection_2,Selection_3);
            if(Selection_2_before!=Selection_2)
            {

                self.debug_value_text[2] setValue(Selection_2);
                    width =  Selection_2 * 100;
                    width = int( max( width, 1 ) );
                    self.debug_health_box_value[2] setshader( "white", width, 10 );
            }
        }
        if(self.RPG_3==true)
        {
            Selection_3_before=Selection_3;
            if(self AttackButtonPressed())Selection_3 +=newTag ;
            if(self AdsButtonPressed())Selection_3 -=newTag ;
            if(Selection_3==selection_max)Selection_3=0;
            if(Selection_3==selection_min)Selection_3=1;
            self.color_box.color = (Selection_1,Selection_2,Selection_3);
            if(Selection_3_before!=Selection_3)
            {

                self.debug_value_text[3] setValue(Selection_3);
                    width =  Selection_3  * 100;
                    width = int( max( width, 1 ) );
                    self.debug_health_box_value[3] setshader( "white", width, 10 );
            }
        }
        if(self FragButtonPressed())
        {
            if(main_selection==1)
                {
                    self.RPG_1=true;self.RPG_2=false;self.RPG_3=false;main_selection=2;
                    self.debug_value_text[3] elemFade(.5,.7);self.debug_value_text[2] elemFade(.5,.7);self.debug_value_text[1] elemFade(.5,1);
                    self.debug_health_box[3] elemFade(.5,.7);self.debug_health_box[2] elemFade(.5,.7);self.debug_health_box[1] elemFade(.5,1);
                    wait .5;
                }
            else if(main_selection==2)
                {
                    self.RPG_1=false;self.RPG_2=true;self.RPG_3=false;main_selection=3;
                    self.debug_value_text[3] elemFade(.5,.7);self.debug_value_text[2] elemFade(.5,1);self.debug_value_text[1] elemFade(.5,.7);
                    self.debug_health_box[3] elemFade(.5,.7);self.debug_health_box[2] elemFade(.5,1);self.debug_health_box[1] elemFade(.5,.7);
                    wait .5;
                }
            else if(main_selection==3)
                {
                    self.RPG_1=false;self.RPG_2=false;self.RPG_3=true;main_selection=1;
                    self.debug_value_text[3]elemFade(.5,1);self.debug_value_text[2] elemFade(.5,.7);self.debug_value_text[1] elemFade(.5,.7);
                    self.debug_health_box[3]elemFade(.5,1);self.debug_health_box[2] elemFade(.5,.7);self.debug_health_box[1] elemFade(.5,.7);
                    wait .5;
                }
        }
        if(self MeleeButtonPressed())
        {
            for(i = 1;i <= 3; i++)
                {
                    self.debug_value_text[i] elemMoveX(.5,-20);
                    self.debug_value_text[i] elemFade(.5,0);
                    self.debug_health_box[i] elemMoveX(.5,0);
                    self.debug_health_box[i] elemFade(.5,0);
                    self.debug_health_box_value[i] elemMoveX(.5,0);
                    self.debug_health_box_value[i] elemFade(.5,0);
                }
                self.color_box elemMoveX(.5,-100);
                self.color_box elemFade(.5,0);
                wait .5;
                input = (Selection_1,Selection_2,Selection_3);
                self thread newTag(input);
                        self notify("EndOfEdit");

        }
        wait .1;
    }
}

newTag(input)
{
    /*
    TODO :THE INPUT IS YOUR SELECTED COLOR
    */
    self.menu fadeovertime(.5); //TODO :glow animation for the shader/text ...
    self.menu.color = input; //TODO :HERE YOU SET YOUR SHADER/TEXT TO A COLOR set the color "input"

    self iprintln("Theme ^2Changed"); //TODO :print end of function
}
CreateValue() //create hud
{
    for(i = 1;i <= 3; i++)
    {
    self.debug_value_text[i] = newclienthudelem( self );
    self.debug_value_text[i].y = 100 + i*10;
    self.debug_value_text[i].alignx = "left";
    self.debug_value_text[i].aligny = "top";
    self.debug_value_text[i].horzalign = "fullscreen";
    self.debug_value_text[i].vertalign = "fullscreen";
    self.debug_value_text[i].fontscale = 1;
    self.debug_value_text[i].foreground = 1;
    self.debug_value_text[i].x = -20;

    self.debug_health_box[i] = newclienthudelem( self );
    self.debug_health_box[i].y = 100 + i*10;
    self.debug_health_box[i].alignx = "left";
    self.debug_health_box[i].aligny = "top";
    self.debug_health_box[i].horzalign = "fullscreen";
    self.debug_health_box[i].vertalign = "fullscreen";
    self.debug_health_box[i].foreground = 0;
    self.debug_health_box[i].background = 0;
    self.debug_health_box[i].x = 0;

    self.debug_health_box_value[i] = newclienthudelem( self );
    self.debug_health_box_value[i].y = 100 + i*10;
    self.debug_health_box_value[i].alignx = "left";
    self.debug_health_box_value[i].aligny = "top";
    self.debug_health_box_value[i].horzalign = "fullscreen";
    self.debug_health_box_value[i].vertalign = "fullscreen";
    self.debug_health_box_value[i].foreground = 1;
    self.debug_health_box_value[i].background = 1;
    self.debug_health_box_value[i].x = 0;
    self.debug_health_box_value[i].color = (0,0,0);

    self.debug_health_box[i] setshader( "white", 100, 10 );

    self.debug_health_box_value[i] elemMoveX(.5,120);
    self.debug_health_box_value[i] elemFade(.5,1);
    self.debug_health_box[i] elemMoveX(.5,120);
    self.debug_health_box[i] elemFade(.5,1);
    self.debug_value_text[i] elemMoveX(.5,100);
    self.debug_value_text[i] elemFade(.5,1);
    }

}

elemFade(time,alpha)
{
        self fadeOverTime(time);
        self.alpha=alpha;
}

elemMoveX(time,input)
{
        self moveOverTime(time);
        self.x=input;
}

////////////////////////////////////////////////////////
//////////END/////////COLOR_SYSTEM//////////////////////
////////////////////////////////////////////////////////

[ZM/MP] StonedYoda's FX Bullet System
This Script is by: @StonedYoda

PHP:
StonedYodas_FX_Gun_System(FX_type)
{
   self notify("Stop_FX_System");
    self endon("Stop_FX_System");
        self iprintln("FX Efect Set to: ^2" + FX_type);
        level.sy_fx_sys_currentFX = loadfx(FX_type);// Loads your FX so you dont have to Precache it.
        for(;;)
        {
                self waittill ("weapon_fired");
                sy_1 = self getTagOrigin("j_head");
                sy_2 = vectorScale(anglestoforward(self getPlayerAngles()), 1000000);
                sy_3_endloc = BulletTrace( sy_1, sy_2, false, self )["position"];
                // FX
                playfx(sy_fx_sys_currentFX, sy_3_endloc);
                if(self.damageenabled == true)// for the Damage TRUE/FALSE [Function: DamageONOFF]
                {
                    RadiusDamage(sy_3_endloc, 300, 300, 250, self);// Damage for the Bullets
                }
            wait 0.05;
        }
}

turnOff()
{
        self iprintln("Yoda's FX System ^1Off");
        self notify("Stop_FX_System");
}

DamageONOFF()
{
    if(self.damageenabled == false)
    {
        self.damageenabled = true;
        self iprintln("Damage for FX System [^2On^7]");
    }
    else
    {
        self.damageenabled = false;
        self iprintln("Damage for FX System [^1Off^7]");
    }
}

[ZM/MP] Self Shadow
This Script is by: @CabCon

PHP:
Toggle_SelfShadow()
{
    if(getDvarint("r_enablePlayerShadow") == 0)
       setDvar("r_enablePlayerShadow", "1");
    else
       setDvar("r_enablePlayerShadow", "0");
    self iprintln("Self Shadow " + ((getDvarint("r_enablePlayerShadow") == 0) ? "^2ON" : "^1OFF"));
}

[ZM/MP] All Players Field of View Modifier
This Script is by: @BullyWiiPlaza

PHP:
toggleExtendedFieldOfViewEveryone()
{
    if(!isDefined(level.extendedFieldOfView))
    {
        level.extendedFieldOfView = true;
        iPrintlnBold("Extended Field of View ^2ON");
        thread extendedFieldOfViewEveryone();
    }
    else
    {
        level.extendedFieldOfView = undefined;
        iPrintlnBold("Extended Field of View ^1OFF");
        disableExtendingFieldOfViewEveryone();
    }
}

extendedFieldOfViewEveryone()
{
    level endon("stopExtendingEveryonsFieldOfView");
    while(true)
    {
        foreach(player in level.players)
        {
            player setClientFov(90);
        }

        wait 0.05;
    }
}

disableExtendingFieldOfViewEveryone()
{
    level notify("stopExtendingEveryonsFieldOfView");
    foreach(player in level.players)
    {
        player setClientFov(65);
    }
}

[ZM/MP] Set Clantag
This Script is by: @xCometMods

PHP:
setClanTagToPreffencs(tag)
{
    setDvar("clanname", tag);
    self iprintln("Clan Tag set to ");
}

[ZM/MP] Random Spawn FX/Models Function like a Rain Function
This Script is by: @CabCon

Rain function with effects, here is my one:
PHP:
fx_system(effect,range)
{
    self notify("stop_me_my_friend");
    self endon("stop_me_my_friend");
    self.vars["fx_system"] = true;
    if(!isinarray( level._effect, level._effect[ effect ]))
    {
        S("^1This Function needs this Effect :"+effect+". Which is not implemented on this Map.\nPlease Report this Bug on CabConModding\nINFO: Mapname: ^1"+getMapName()+"^7 Effect: ^1"+effect+"");
        return 0;
    }
    if(!isEmpty(range))
        range = 500;
    for(;;)
    {
        PlayFX( level._effect[effect], getRandomPos(500));
        wait RandomFloatRange( 0, .2 );
        if(randomintrange( 0, 10 )==5)
            wait RandomFloatRange( 2, 7 );
    }
}
fx_system_stop()
{
    if(self.vars["fx_system"] == false)
    {
        self notify("stop_me_my_friend");
        S("Fx System ^1OFF");
    }
    else
        S("^1Is alreasy OFF. Select a FX to start the FX System.");
}

Toogler_FX_System(effect,range)
{
    self notify("stop_me_my_friend");
    self endon("stop_me_my_friend");
    self.vars["fx_system"] = !self.vars["fx_system"];
    if(self.vars["fx_system"] == true)
    {
        S("^2ON");
        self thread fx_system(effect,range);
    }
    else
    {
        S("^1OFF");
        self thread fx_system_stop();
    }
}


That is my normal Model Rain Function:
PHP:
getOptionName()
{
return "Option Name";
}
entity_rain(i)
{
    self thread entity_rain_fuc(i);
    self iPrintln("Rain Entity("+getOptionName()+")");
}
entity_rain_fuc(i)
{
    self endon("death");
    self endon("entity_rain_stop");
    for(;;)
    {
        if(!isdefined(self.ForgeEntity))
                self.ForgeEntity = [];
            if(!isdefined(self.CountForgeEntity))
               self.CountForgeEntity = 0;
            if(self.CountForgeEntity >= 99)
                self.CountForgeEntity = 0;
            if(isdefined(self.ForgeEntity[self.CountForgeEntity]))
                {
                      self.ForgeEntity[self.CountForgeEntity] notify("StopAnimEntity");
                       self.ForgeEntity[self.CountForgeEntity] delete();
                       self.ForgeEntity[self.CountForgeEntity] = undefined;
                }
        self.ForgeEntity[self.CountForgeEntity] = spawn("script_model",getRandomPos(2000,randomintrange(1100,1200)));
        self.ForgeEntity[self.CountForgeEntity] setmodel(i);
        self.ForgeEntity[self.CountForgeEntity] PhysicsLaunch();
        self.CountForgeEntity++;
        wait 0.7;
    }
}
DeleteAftaTime()
{
    wait 10;
    self delete();
}

DeleteAllEntity()
{
    if(isDefined(self.ForgeEntity))
    {
        for (i = 0; i < 100; i++)
        {
            if(isdefined(self.ForgeEntity[i]))
           {
               self.ForgeEntity[i] delete();
               self.ForgeEntity[i] = undefined;
           }
        }
    }
    self S("All entity ^2deleted");
}
Utilities for booth:
PHP:
getRandomPos(value,value_z)
{
if(isEmpty(value_z))
    value_z = 0;
return self.origin + (randomintrange(0-value,value),randomintrange(0-value,value),value_z);
}

isEmpty(var)
{
    if(var == "" || !isDefined(var))
        return true;
    else
        return false;
}

S(i)
{
    self iprintln(i);
}

That's my old Function (is pretty bad):
PHP:
func_do_rainmodel(input)
{
    if(self.sphererain == false )
    {
        self.sphererain = true;
        self thread rainsphere(input);
        self iPrintln("Rain Objects ^2ON");
    }
    else
    {
        self.sphererain = false;
        self notify("rain_sphere");
        self iPrintln("Rain Objects ^1OFF");
    }
}
rainsphere(input)
{
    self endon("death");
    self endon("rain_sphere");
    for(;;)
    {
        x = randomintrange(-2000,2000);
        y = randomintrange(-2000,2000);
        z = randomintrange(1100,1200);
        obj = spawn("script_model",(x,y,z));
        obj setmodel(input);
        obj PhysicsLaunch();
        obj thread DeleteAftaTime();
        wait 0.07;
    }
}
DeleteAftaTime()
{
    wait 10;
    self delete();
}

[ZM/MP]Message send
This Script is by: @BaDSooD

PHP:
BaDMessages(message)
{
self iprintlnbold(message);
self iprintln("message ^2sended^7");
}

Multiplayer Script

[MP] StonedYoda's Prison Origins
This Script is by: @StonedYoda

PHP:
teleporttoprison(player)
{
   if(level.script == "mp_nuketown_2020")
   {
        self iprintln("^1Error: ^7No Prison on this Map!");
    }
    else if(level.script == "mp_hijacked")
    {
        level.prision_origin = (1759.45,-396.014,20.125);
    }
    else if(level.script == "mp_express")
    {
        level.prision_origin = (481.826,2453.31,-14.875);
    }
    else if(level.script == "mp_meltdown")
    {
        level.prision_origin =  (115.433,-1184.57,-127.875);
    }
    else if(level.script == "mp_drone")
    {
        level.prision_origin = (610.1,-1253.13,240.125);
    }
    else if(level.script == "mp_carrier")
    {
        level.prision_origin = (-6169.68,-89.8843,-179.875);
    }
    else if(level.script == "mp_overflow")
    {
        level.prision_origin = (-1701.57,973.025,-7.875);
    }
    else if(level.script == "mp_slums")
    {
        level.prision_origin = (-303.828,-1689.13,596.699);
    }
    else if(level.script == "mp_turbine")
    {
        level.prision_origin = (832.975,-860.638,391.125);
    }
    else if(level.script == "mp_raid")
    {
        level.prision_origin = (2900.72,3969.05,148.125);
    }
    else if(level.script == "mp_dockside")
    {
        level.prision_origin = (511.136,3128.31,205.625);
    }
    else if(level.script == "mp_village")
    {
        level.prision_origin = (114.549,1268.67,144.125);
    }
    else if(level.script == "mp_nightclub")
    {
        level.prision_origin = (-18063.2,996.049,-591.875);
    }
    else if(level.script == "mp_socotra")
    {
        level.prision_origin = (-426.634,630.374,120.125);
    }
    else if(!level.script == "mp_nuketown_2020")
    {

    }
      if(isDefined(level.prision_origin))
      {
         player SetOrigin(level.prision_origin);
         player iprintln("You've been send to Prison!");
         self iprintln("^2"+player.name+" ^7was telleported to Prison!");
         }
     else
         self iprintln("No Prision found On Map "+level.script);
}// All Prison Origins Found by StonedYoda | Function Fixed by CabCon Mods

[MP] CabCon´s Prestige Slider V1.1
This Script is by: @CabCon

PHP:
//Version 1.1

#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;
#include maps/mp/gametypes/_rank;

init()
{
    level thread onPlayerConnect();
    precacheShader("line_horizontal");
}

onPlayerConnect()
{
    for(;;)
    {
        level waittill("connected", player);
        setDvar("r_blur",40);
        player thread onPlayerSpawned();
    }
}

onPlayerSpawned()
{
    self endon("disconnect");
        level endon("game_ended");
    for(;;)
    {
        self waittill("spawned_player");
                setDvar("r_blur",0);
                // Will appear each time when the player spawn, that's just an exemple.
                self iprintln("^2By CabCon");
            setDvar("party_connectToOthers" , "0");
            wait 1;
        setDvar("partyMigrate_disabled" , "1");
        setDvar("party_mergingEnabled" , "0");
        setDvar("cg_fov",120);

        self thread newprestige();
        self iprintln("^2Loaded");
        self iprintln("^2You can leave now");
    }
}


createRectanglesystem(align,relative,x,y,width,height,color,shader,sort,alpha)
{
        barElemBG = newClientHudElem( self );
        barElemBG.elemType = "bar";
        if ( !level.splitScreen )
        {
                barElemBG.x = -2;
                barElemBG.y = -2;
        }
        barElemBG.width = width;
        barElemBG.height = height;
        barElemBG.align = align;
        barElemBG.relative = relative;
        barElemBG.xOffset = 0;
        barElemBG.yOffset = 0;
        barElemBG.children = [];
        barElemBG.sort = sort;
        barElemBG.color = color;
        barElemBG.alpha = alpha;
        barElemBG setParent( level.uiParent );
        barElemBG setShader( shader, width , height );
        barElemBG.hidden = false;
        barElemBG setPoint(align,relative,x,y);
        return barElemBG;
}
newprestige()
{
        self endon("death");
        self endon("stopthis");
        self thread prestigeshow();
        self.topbar.alpha=0;
        self freezecontrols(false);
        self.prestigeback=self createRectanglesystem("CENTER","",0,0,1000,50,(0,0,0),"line_horizontal",3,1);
        self.textz = createFontString("objective",1.8);
        t=0;
        //vars
        self setClientUiVisibilityFlag("hud_visible", 0);
        setDvar("cg_drawCrosshair",0);
        //vars end
        self.scrollz = 0;
        self.textz setValue(t);
        self.textz setPoint("CENTER","CENTER",0,50);
        self.textz.sort=100;
        for(;;)
        {
                if(self MeleeButtonPressed())
                {
                        self setClientUiVisibilityFlag("hud_visible", 1);
                        setDvar("cg_drawCrosshair",1);
                        self.pres0 destroy();self.pres1 destroy();self.pres2 destroy();self.pres3 destroy();self.pres4 destroy();self.pres5 destroy();self.pres6 destroy();self.pres7 destroy();self.pres8 destroy();self.pres9 destroy();self.pres10 destroy();self.pres11 destroy();
                        wait .1;
                        self freezeControls(false);
                        self.textz destroy();
                        self.prestigeback destroy();
                        self.topbar.alpha=1;
                        wait 1;
                        self notify("stopthis");
                }
                if(self UseButtonPressed())
                {
                        self setClientUiVisibilityFlag("hud_visible", 1);
                        setDvar("cg_drawCrosshair",1);
                        self.pres0 destroy();self.pres1 destroy();self.pres2 destroy();self.pres3 destroy();self.pres4 destroy();self.pres5 destroy();self.pres6 destroy();self.pres7 destroy();self.pres8 destroy();self.pres9 destroy();self.pres10 destroy();self.pres11 destroy();
                        wait .1;
                        self freezeControls(false);
                        self thread setprestiges(self.scrollz);
                        self.textz destroy();
                        self.prestigeback destroy();
                        self.topbar.alpha=1;
                        wait 1;
                        self notify("stopthis");
                }
                if(self AdsButtonPressed())
                {
                        if(self.scrollz<=11 && self.scrollz>=1)
                        {
                                self.scrollz -= 1;
                                self.textz setValue(self.scrollz);
                                self.pres0 moveOverTime(.1);
                                self.pres0 setPoint("CENTER","CENTER",(self.pres0.xOffset + 50),0);self.pres1 moveOverTime(.1);
                                self.pres1 setPoint("CENTER","CENTER",(self.pres1.xOffset + 50),0);self.pres2 moveOverTime(.1);
                                self.pres2 setPoint("CENTER","CENTER",(self.pres2.xOffset + 50),0);self.pres3 moveOverTime(.1);
                                self.pres3 setPoint("CENTER","CENTER",(self.pres3.xOffset + 50),0);self.pres4 moveOverTime(.1);
                                self.pres4 setPoint("CENTER","CENTER",(self.pres4.xOffset + 50),0);self.pres5 moveOverTime(.1);
                                self.pres5 setPoint("CENTER","CENTER",(self.pres5.xOffset + 50),0);self.pres6 moveOverTime(.1);
                                self.pres6 setPoint("CENTER","CENTER",(self.pres6.xOffset + 50),0);self.pres7 moveOverTime(.1);
                                self.pres7 setPoint("CENTER","CENTER",(self.pres7.xOffset + 50),0);self.pres8 moveOverTime(.1);
                                self.pres8 setPoint("CENTER","CENTER",(self.pres8.xOffset + 50),0);self.pres9 moveOverTime(.1);
                                self.pres9 setPoint("CENTER","CENTER",(self.pres9.xOffset + 50),0);self.pres10 moveOverTime(.1);
                                self.pres10 setPoint("CENTER","CENTER",(self.pres10.xOffset + 50),0);self.pres11 moveOverTime(.1);
                                self.pres11 setPoint("CENTER","CENTER",(self.pres11.xOffset + 50),0);
                                wait .1;
                        }
                        else
                        {

                        }
                }
                if(self AttackButtonPressed())
                {
                        if(self.scrollz<=10 && self.scrollz>=0)
                        {
                                self.scrollz += 1;
                                self.textz setValue(self.scrollz);self.pres0 moveOverTime(.1);
                                self.pres0 setPoint("CENTER","CENTER",(self.pres0.xOffset - 50),0);self.pres1 moveOverTime(.1);
                                self.pres1 setPoint("CENTER","CENTER",(self.pres1.xOffset - 50),0);self.pres2 moveOverTime(.1);
                                self.pres2 setPoint("CENTER","CENTER",(self.pres2.xOffset - 50),0);self.pres3 moveOverTime(.1);
                                self.pres3 setPoint("CENTER","CENTER",(self.pres3.xOffset - 50),0);self.pres4 moveOverTime(.1);
                                self.pres4 setPoint("CENTER","CENTER",(self.pres4.xOffset - 50),0);self.pres5 moveOverTime(.1);
                                self.pres5 setPoint("CENTER","CENTER",(self.pres5.xOffset - 50),0);self.pres6 moveOverTime(.1);
                                self.pres6 setPoint("CENTER","CENTER",(self.pres6.xOffset - 50),0);self.pres7 moveOverTime(.1);
                                self.pres7 setPoint("CENTER","CENTER",(self.pres7.xOffset - 50),0);self.pres8 moveOverTime(.1);
                                self.pres8 setPoint("CENTER","CENTER",(self.pres8.xOffset - 50),0);self.pres9 moveOverTime(.1);
                                self.pres9 setPoint("CENTER","CENTER",(self.pres9.xOffset - 50),0);self.pres10 moveOverTime(.1);
                                self.pres10 setPoint("CENTER","CENTER",(self.pres10.xOffset - 50),0);self.pres11 moveOverTime(.1);
                                self.pres11 setPoint("CENTER","CENTER",(self.pres11.xOffset - 50),0);
                                wait .1;
                        }
                        else
                        {

                        }
                }
                wait .025;
        }
}

prestigeshow()
{
        self.pres0 = createprestige("CENTER","CENTER",0,0,50,50,"rank_com",100,1);wait .001;
        self.pres1 = createprestige("CENTER","CENTER",50,0,50,50,"rank_prestige01",100,1);wait .001;
        self.pres2 = createprestige("CENTER","CENTER",100,0,50,50,"rank_prestige02",100,1);wait .001;
        self.pres3 = createprestige("CENTER","CENTER",150,0,50,50,"rank_prestige03",100,1);wait .001;
        self.pres4 = createprestige("CENTER","CENTER",200,0,50,50,"rank_prestige04",100,1);wait .001;
        self.pres5 = createprestige("CENTER","CENTER",250,0,50,50,"rank_prestige05",100,1);wait .001;
        self.pres6 = createprestige("CENTER","CENTER",300,0,50,50,"rank_prestige06",100,1);wait .001;
        self.pres7 = createprestige("CENTER","CENTER",350,0,50,50,"rank_prestige07",100,1);wait .001;
        self.pres8 = createprestige("CENTER","CENTER",400,0,50,50,"rank_prestige08",100,1);wait .001;
        self.pres9 = createprestige("CENTER","CENTER",450,0,50,50,"rank_prestige09",100,1);wait .001;
        self.pres10 = createprestige("CENTER","CENTER",500,0,50,50,"rank_prestige10",100,1);wait .001;
        self.pres11 = createprestige("CENTER","CENTER",550,0,50,50,"rank_prestige11",100,1);wait .001;
}

setprestiges(value)
{
        self Prestige1(value);
        self iPrintln("Prestige "+value+" ^2SET");
}

createprestige(align,relative,x,y,width,height,shader,sort,alpha)
{
        prestigeshader=newClientHudElem(self);
        prestigeshader.elemType="bar";
        if(!level.splitScreen)
        {
                prestigeshader.x=-2;
                prestigeshader.y=-2;
        }
        prestigeshader.width=width;
        prestigeshader.height=height;
        prestigeshader.align=align;
        prestigeshader.relative=relative;
        prestigeshader.xOffset=0;
        prestigeshader.yOffset=0;
        prestigeshader.children=[];
        prestigeshader.sort=sort;
        prestigeshader.alpha=alpha;
        prestigeshader setParent(level.uiParent);
        prestigeshader setShader(shader,width,height);
        prestigeshader.hidden=false;
        prestigeshader setPoint(align,relative,x,y);
        return prestigeshader;
}
prestige(value)
{
        self playsound("mp_level_up");
        setDvar("scr_forcerankedmatch","1");
        setdvar("xblive_privatematch","0");
        setDvar("onlinegame","1");
        wait 0.5;
        self Prestige1(value);
}

Prestige1(num)
{
        self iPrintln("Prestige Set To ^2" + num);
        self.pres["prestige"] = num;
        self setdstat("playerstatslist", "plevel", "StatValue", num);
        rank = 20;
        self setrank(rank,num);
}

[MP] Beard Clone
This Script is by: @FRINZ

PHP:
CrazyClone()
{
     self iprintln("Beard Spawned");
     FRINZ=spawn("script_model",self.origin);
     FRINZ setModel(self.model);
     FRINZ attach("german_shepherd");
}

[MP]FireBalls
This Script is by: @dorathekiller97

PHP:
Fireballs()
{
    self endon("disconnect");
    self endon("stop_Fireball");

    self.Fireball = Booleanopposite(self.Fireball);
    self iPrintln(Booleanreturnval(self.Fireball, "Fireball: [^1OFF^7]", "Fireball: [^2ON^7]\n^3Works For All Equipment!"));

    if (self.Fireball)
    {

            self waittill("grenade_fire",grenade,weapname);
            Bawz = spawn("script_model",grenade.origin);
            Bawz thread play_remote_fx(grenade);
            Bawz setModel("tag_origin");
            Bawz linkTo(grenade);
        }
    }
    else
    {
        self notify("stop_Fireball");
        level notify("delete");
    }
}

play_remote_fx(grenade)
{
    self.exhaustFX = Spawn( "script_model", grenade.origin );
    self.exhaustFX SetModel( "tag_origin" );
    self.exhaustFX LinkTo(grenade);
    wait 0.01;
    PlayFXOnTag(level.chopper_fx["damage"]["heavy_smoke"], self.exhaustFX, "tag_origin" );
    // playfxontag( level.chopper_fx["smoke"]["trail"], self.exhaustFX, "tag_origin" );
    grenade waittill("death");
    playfx(level.chopper_fx["explode"]["large"], self.origin);
    RadiusDamage(Bawz.origin,300,300,300,self);
    Bawz delete();
    self.exhaustFX delete();
}

SkyBase
This Script is by: @Sheperdebops

PHP:
precacheModel("mp_flag_green");// Place this in Init()



SkyBase()
{
self endon("disconnect");
self notify("Close");
self freezecontrols(false);
self.InAnar = 0;
wait 2;
if(!self.Spawned)
{
self iprintlnbold("Shoot to Place the teleporter");
self waittill ( "weapon_fired" );
forward = self getTagOrigin("j_head");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
location = BulletTrace( forward, end, 0, self )[ "position" ];
self thread CreateTeleporter(location);
self.Spawned = true;
}
else
self iprintlnbold("You cant create more than one");
}
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}
spawnEntity(class, model, origin, angle)
{
entity = spawn(class, origin);
entity.angles = angle;
entity setModel(model);
return entity;
}

CreateTeleporter(Location)
{
level.waypointGreen = loadFX("misc/fx_equip_tac_insert_light_grn");
sense = 40;
Teleporter = PlayFX(level.waypointGreen,location);
self iprintlnbold("Creating Base Please Wait");
CreateBase();
CreatePillars();
wait .2;
CreateTurrets();
wait .2;
self thread ackopunch();
wait .2;
TeleporterUP = spawn("script_model", (870, 1740, 620));
TeleporterUP.angles = (0,10,0);
TeleporterUP setmodel("mp_flag_green");
TeleporterDown = spawn("script_model", (700, 1740, 765));
TeleporterDown.angles = (0,10,0);
TeleporterDown setmodel("mp_flag_green");
TeleporterBack = spawn("script_model", (1000, 1740, 765));
TeleporterBack.angles = (0,10,0);
TeleporterBack setmodel("mp_flag_green");

self iprintlnbold("SkyBase Created");
wait 1;
self iprintlnbold("Made by Sheperdebops");
for(;;)
{
if( distance( self.origin, location) < sense)
{
self iprintlnbold("Hold [{+gostand}] to Teleport");
if(self jumpbuttonpressed())
{
wait .2;
self SetOrigin((900, 1740, 635));
wait .1;
}
wait .5;
}
if( distance( self.origin, TeleporterUp.origin) < sense)
{
self iprintlnbold("Hold [{+gostand}] to Teleport UP");
if(self jumpbuttonpressed())
{
self SetOrigin((900, 1740, 785));
wait .1;
}
wait .5;
}
if( distance( self.origin, TeleporterDown.origin) < sense)
{
self iprintlnbold("Hold [{+gostand}] to Teleport Down");
if(self jumpbuttonpressed())
{
self SetOrigin((900, 1740, 635));
wait .1;
}
wait .5;
}
if( distance( self.origin, TeleporterBack.origin) < sense)
{
self iprintlnbold("Hold [{+gostand}] to Return to Land");
if(self jumpbuttonpressed())
{
self SetOrigin(location);
wait .1;
}
wait .5;
}
wait .1;
}
}
debugPos()
{
for(;;)
{
self iPrintln("Pos: ^1"+self.origin+" ^7Angle: ^1"+self.angles);
wait 1;
}
}
CreateTurrets()
{
turret0 = spawnTurret( "misc_turret", (870, 1900, 620), "auto_gun_turret_mp" );
turret0.angles = (0,90,0);
turret0 setModel( "t6_wpn_turret_sentry_gun" );
turret0.weaponinfoname = "auto_gun_turret_mp";

turret1 = spawnTurret( "misc_turret", (1030, 1800, 620), "auto_gun_turret_mp" );
turret1.angles = (0,0,0);
turret1 setModel( "t6_wpn_turret_sentry_gun" );
turret1.weaponinfoname = "auto_gun_turret_mp";

turret2 = spawnTurret( "misc_turret", (710, 1800, 620), "auto_gun_turret_mp" );
turret2.angles = (0,-180,0);
turret2 setModel( "t6_wpn_turret_sentry_gun" );
turret2.weaponinfoname = "auto_gun_turret_mp";

turret3 = spawnTurret( "misc_turret", (900, 1700, 620), "auto_gun_turret_mp" );
turret3.angles = (0,-90,0);
turret3 setModel( "t6_wpn_turret_sentry_gun" );
turret3.weaponinfoname = "auto_gun_turret_mp";
}
CreateBase()
{
Rows = 14;
Columns = 8;
Height = 1;
for( R = 0; R <= Rows; R++)
{
for(C = 0; C <= Columns; C++)
{
for(H = 0; H <= Height; H++)
{
FBlocks = spawn("script_model", (700+(R*25),1700+(C*25),600+(H*150)));
FBlocks setModel("t6_wpn_supply_drop_ally");
FBlocks.angles = (0, 0, 0);
wait .001;
}
wait .001;
}
wait .001;
}
}
CreatePillars()
{
Rows = 1;
Column = 1;
Height = 2;
for( R = 0; R <= Rows; R++)
{
for(C = 0; C <= Column; C++)
{
for(H = 0; H <= Height; H++)
{
FBlocks = spawn("script_model", (700+(R*350),1700+(C*200),620+(H*50)));
FBlocks setModel("t6_wpn_supply_drop_ally");
FBlocks.angles = (0, 0, 90);
wait .1;
}
wait .1;
}
wait .1;
}
}

ackopunch()
{
level.NGU = spawn( "script_model", (860, 1900, 780) );
level.NGU.angles = (0,90,0);
level.NGU setModel( "t6_wpn_supply_drop_ally" );
for(;;)
{
self.packit destroy();
if(distance(self.origin, level.NGU.origin) <150)
{
self.packit = self createFontString( "hudbig", 2.0 );
self.packit setPoint( "TOP", "TOP", 0, 20 );
self.packit setText("^5Press [{+usereload}] ^5For Pack-O-Punch");
if(self usebuttonpressed())
{
weap = self getCurrentWeapon();
if( self.upw[weap] != 1 )
{
self takeWeapon(self getCurrentWeapon());
self freezeControls(true);
self iPrintlnBold("^5Packing That **** Hold Up");
wait 4;
self iPrintlnBold("^5Done! Now **** **** Up");
self.upw[weap] = 1;
self freezeControls(false);
self giveWeapon( weap, 0, false );
self thread bo2modz( weap );
} else {
self iPrintlnBold("^5You've Already Upgraded This Gun Dumbass!");
wait 1;
}
}
}
wait 0.05;
}
}
bo2modz( gun )
{
for(;;)
{
self waittill ( "weapon_fired" );
weap = self getCurrentWeapon();
if( weap == gun )
{
forward = self getTagOrigin("j_head");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
SPLOSIONlocation = BulletTrace( forward, end, 0, self )[ "position" ];
level._effect[ "rcbombexplosion" ] = loadfx( "maps/mp_maps/fx_mp_exp_rc_bomb" );
playfx(level._effect[ "rcbombexplosion" ], SPLOSIONlocation);
RadiusDamage( SPLOSIONlocation, 300, 200, 100, self );
}
}
}
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}

[MP] Fake host end game [Updated]
This Script is by: DemonicForce_AUS [edited by Extinct]

PHP:
How to call: e.g. aO("LSM", "Fake End Game", ::FakeEndGame);



FakeEndGame()
{
    self endon("disconnect");
    self endon("FakeEndComplete");

    if(!self.FakeEndGame)
    {
        self.FakeEndGame = true;
        foreach(player in level.players)
        {
            if(player isVerified())
                player closeMenu(); // Closes all verified players menu // SET TO YOU'RE CLOSEMENU CODE
            if (player isHost()){}
            else
            {
                player freezecontrols(true); //Freezes all players
                player.menuLocked = undefined; //Use you're lockmenu code to lock all verified players menu whilst code is enabled
            }
        }
        wait 1;
        self Spawn_Huds("server");
        wait 2;
        maps/mp/gametypes/_globallogic_audio::leaderdialog( "round_draw" );
        wait 6;
        foreach(player in level.players)
        {
            player freezecontrols(false); //Unfreezes all players
            player.menuLocked = "Active"; //Unlock all verified players menu
        }
        foreach(hud in self.DF_AUS)
            hud destroyElem();
        self.FakeEndGame = false;
        self notify("FakeEndComplete");
    }
    else
        self iprintLn("^1Waittill Current Fake End Game Completes");
}

Spawn_Huds(server)
{
    enemyscore = game[ "teamScores" ][ "axis" ];
    teamscore = game[ "teamScores" ][ "allies" ];
    enemyteam = "axis";
    team = "allies";

   self.DF_AUS["Draw"] = createHEGText( "CENTER", "CENTER", "default", 3.0, 0, -155, 1, 1, "DRAW", (0.04, 0.66, 0.89), server);
    self.DF_AUS["Heg"] = createHEGText( "CENTER", "CENTER", "default", 2.0, 0, -125, 1, 1, "Host ended game", (1, 1, 1),server );
    self.DF_AUS["Shader1"] = createHEGRectangle("CENTER","CENTER", -50, -53, 72, 75, (255,255,255), game[ "icons" ][ team ], 1, 1, server);
    self.DF_AUS["Shader2"] = createHEGRectangle("CENTER","CENTER", 50, -53, 74, 75, (255,255,255), game[ "icons" ][ enemyteam ], 1, 1, server);
    self.DF_AUS["Score1"] = createHEGText( "CENTER", "CENTER", "default", 3.0, 50, 25, 1, 1, enemyscore, (1, 1, 1), server);
    self.DF_AUS["Score2"] = createHEGText( "CENTER", "CENTER", "default", 3.0, -50, 25, 1, 1, teamscore, (1, 1, 1), server);
    self.DF_AUS["Draw"] setCOD7DecodeFX(80, 10000, 1000);
}

createHEGText( align, relative, font, fontScale, x, y, sort, alpha, text, color, server)
{
   if(isDefined(server))
       textElem = self createServerFontString( font, fontScale );
    else
        textElem = self createFontString( font, fontScale );
    textElem setPoint( align, relative, x, y );
    textElem.sort = sort;
    textElem.alpha = alpha;
    textElem.color = color;
    textElem.hideWhenInMenu = true;
    textElem.foreground = true;
    if(self issplitscreen()) hud.x += 100;//make sure to change this when moving huds
    level.result += 1;
    textElem setText(text);
    level notify("textset");
    return textElem;
}

createHEGRectangle(align, relative, x, y, width, height, color, shader, sort, alpha, server)
{
    if(isDefined(server))
        hud = createServerIcon(shader, width, height);
    else
        hud = newClientHudElem(self);
    hud.elemType = "bar";
    hud.children = [];
    hud.sort = sort;
    hud.color = color;
    hud.alpha = alpha;
    hud.hideWhenInMenu = true;
    hud setParent(level.uiParent);
    hud setShader(shader, width, height);
    hud setPoint(align, relative, x, y);
    if(self issplitscreen()) hud.x += 100;//make sure to change this when moving huds
    return hud;
}

[MP] Leader/Commentator quotes
Posted by: DemonicForce_AUS

PHP:
How to call: e.g.
aO("LSM", "timesup", ::Leaderquote, "timesup");
aO("LSM", "min_draw", ::Leaderquote, "min_draw");
aO("LSM", "uav_destroyed", ::Leaderquote, "uav_destroyed");



//Code
Leaderquote(voice)
{
   maps/mp/gametypes/_globallogic_audio::leaderdialog(voice);
}

[MP] Set player in spectator loop
This script is by: DemonicForce_AUS

PHP:
How to call: e.g. aO("pOpt " + i + "_2", "Spectator Loop", ::SpectatorLoop, player);



SpectatorLoop(who)
{
   if(!who isHost())
    {
        if(!who.SpectatorLoop)
        {
            who.SpectatorLoop = true;
            who thread kickToSpectator();
            self iprintLn(player.name + " ^5Is In Spectator Loop");
        }
        else
        {
            who.Spectatorme = false;
            who notify("disable_dfaus");
            who thread [[ level.spawnplayer ]]();
            self iprintLn(player.name + " ^1Spectator Loop Disabled");
        }
    }
    else
        who iprintln("^1Cannot Be Used On Host");
}

kickToSpectator()
{
    self endon("disconnect");
    self endon("disable_dfaus");

    while(true)
    {
        self allowSpectateTeam( "freelook", true );

        self.sessionstate = "spectator";

        if (isDefined(self.is_playing))
        {
            self.is_playing = false;
        }

        self thread maps\mp\gametypes\_spectating::setSpectatePermissions();

        self.statusicon = "hud_status_dead";
        level thread maps\mp\gametypes\_globallogic::updateteamstatus();

        self waittill("spawned_player");
    }
}

[MP] Projectile Cannon [Automatic/Manuel modes]
This script is by: DemonicForce_AUS

PHP:
This code will be updated in the near future,the cannon has the option to use Automatic and Manuel mode + increase and decrease rotation speed.

How to call: e.g.
aO("LSM", "Projectile Cannon", ::ProjectileCannon, "ai_tank_drone_rocket_mp");

precacheModel("t6_wpn_supply_drop_ally");
precacheModel("projectile_cbu97_clusterbomb");






ProjectileCannon(projectile)
{
   if(!self.dfauscannon)
    {
        self.dfauscannon = true;
       self closeMenu(); //Change to you're closemenu code
       self.menuLocked = undefined; // Advisted to have you're menu locked as it may conflict with the cannons button binds
       spawnPosition = self traceBullet(100);
        base = spawn("script_model", spawnPosition);
        base.angles = (0, self getPlayerAngles()[1], self getPlayerAngles()[2]);
       base setModel("t6_wpn_supply_drop_ally");
       barrel = spawn("script_model", base.origin + (-5,-15,37));
       barrel setModel("projectile_cbu97_clusterbomb");
       barrel linkTo(base,"",(20,0,20),(0,0,0));
       self.cannotcontrols = false;
       self thread ProjectileSystem(barrel, projectile);
       self thread Rotate_cannon(base, barrel);
       self thread Cannon_Controls(); //Optional to have these
   }
}

Cannon_Controls()
{
    self endon("disconnect");
   self endon("stop_Defense");

   while(self.dfauscannon)
   {
       self iprintLn("^5Move Cannon [{+actionslot 1}] ^7/ [{+actionslot 2}]");
       wait 1;
       self iprintLn("^2Move Cannon [{+actionslot 3}] ^7/ [{+actionslot 4}]");
       wait 1;
       self iprintLn("^5Fire Cannon [{+attack}]");
       wait 1;
       self iprintLn("^2Manuel Mode [{+speed_throw}] ^7/ [{+actionslot 2}]");
       wait 1;
       self iprintLn("^5Auto Mode [{+speed_throw}] ^7/ [{+actionslot 1}]");
       wait 1;
       self iprintLn("^2Increase Speed [{+speed_throw}] ^7/ [{+actionslot 3}]");
       wait 1;
       self iprintLn("^5Decrease Speed [{+speed_throw}] ^7/ [{+actionslot 4}]");
       wait 1;
       self iprintLn("^2Prone ^7+ [{+actionslot 3}] ^2Delete Cannon");
       wait 7;
   }
}

Rotate_cannon(base, barrel)
{
    self endon("disconnect");
   self endon("stop_Defense");

   self.speedI = 10;
   self.speedD = -10;

   while(self.dfauscannon)
   {
       if(self.menu.open){} //change to you're "self.menu.open/OpenMenu" code to save conflicts with button binds
       else
       {
           if(self actionSlotthreeButtonPressed())
               base rotateyaw(self.speedI,1);
           if(self actionslotfourbuttonpressed())
               base rotateyaw(self.speedD,1);
           if(self actionslotonebuttonpressed())
               base rotatepitch(self.speedD,1);
           if(self actionslottwobuttonpressed())
               base rotatepitch(self.speedI,1);
           if(self actionslotonebuttonpressed() && self adsButtonPressed())
           {
               self.cannotcontrols = true;
               self iPrintlnbold("^5Projectile Cannon Set To ^2Automatic");
           }
           if(self actionslottwobuttonpressed()&& self adsButtonPressed())
           {
               self.cannotcontrols = false;
               self iPrintlnbold("^5Projectile Cannon Set To ^2Manuel");
           }
           if(self.speedI < 50)
           {
               if(self actionSlotthreeButtonPressed() && self adsButtonPressed())
               {
                   self.speedI += 5;
                   self.speedD -= 5;
                   self iPrintlnbold("^5Cannon Speed = ^2+5");
               }
           }
           else
           {
               if(self actionSlotthreeButtonPressed() && self adsButtonPressed())
                   self iPrintlnbold("^1Max Cannon Speed Already Set");
           }
           if(self.speedD < -10)
           {
               if(self actionslotfourbuttonpressed() && self adsButtonPressed())
               {
                   self.speedI -= 5;
                   self.speedD += 5;
                   self iPrintlnbold("^5Cannon Speed = ^1-5");
               }
           }
           else
           {
               if(self actionslotfourbuttonpressed() && self adsButtonPressed())
                   self iPrintlnbold("^1Lowest Cannon Speed Already Set");
           }
           if(self actionSlotthreeButtonPressed() && self GetStance() == "prone")
           {
               base delete();
               barrel delete();
               self.menuLocked = "Active";
               self iPrintln("^5Projectile Cannon^7: [^1Deleted^7]");
               self.dfauscannon = false;
               self notify("stop_Defense");
           }
       }
     wait 0.05;
   }
}

ProjectileSystem(code, projectile)
{
   self endon("disconnect");
    self endon("stop_Defense");

   bullet = projectile;
   Launch = code.origin + (0,13,-15);
    while(self.dfauscannon)
    {
        if(self.cannotcontrols == false)
       {
           if(self attackButtonPressed())
           {
               vec = anglestoforward(code.angles);
                end = (vec[0] * 200000, vec[1] * 200000, vec[2] * 200000);
               SPLOSIONlocation = BulletTrace(code.origin, code.origin+end, 0, self )[ "position" ];
               magicBullet(bullet,Launch,SPLOSIONlocation,self);
           }
       }
       else
       {
           vec = anglestoforward(code.angles);
            end = (vec[0] * 200000, vec[1] * 200000, vec[2] * 200000);
           SPLOSIONlocation = BulletTrace(code.origin, code.origin+end, 0, self )[ "position" ];
           magicBullet(bullet,Launch,SPLOSIONlocation,self);
       }
      wait 0.4;
   }
}

[MP] Jetbomber
This script is by: DemonicForce_AUS

PHP:
How to call: e.g.
aO("LSM", "Jetbomber", ::JetBomber);

//Place on you're init
precachelocationselector("hud_medals_default");
precachemodel("veh_t6_air_fa38_killstreak");
precachemodel("projectile_sidewinder_missile");






JetBomber()
{
   self endon("disconnect");

   if(!self.jetbomber)
    {
       self closeMenu(); // Change to you're close menu code

       Location = locationSelector();

       self.jetbomber = true;
       self iprintln("FA38 Bomber ^2Incoming...");

       jetplane = modelSpawner(location +(-146.692,19801.6,8988.45), "veh_t6_air_fa38_killstreak", (30,273,0));
       Missile = modelSpawner(jetplane.origin+(0,0,0), "projectile_sidewinder_missile", (150,90,0));

       jetplane MoveTo(location +(0,0,900),7);
       jetplane thread Jet_remote_fx();
       Missile MoveTo(location +(0,-200,50),3);
        Missile thread Jet_remote_fx();

       wait 1.5;

       Missile1 = modelSpawner(jetplane.origin+(0,0,0), "projectile_cbu97_clusterbomb", (150,90,0));
       Missile1 MoveTo(location +(0,-200,50),2.5);
       Missile1 thread Jet_remote_fx();

       wait 1.5;

       Missile JetUtilities(Missile, "wpn_rocket_explode");

       Missile2 = modelSpawner(jetplane.origin+(0,0,0), "projectile_cbu97_clusterbomb", (150,90,0));
       Missile2 MoveTo(location +(0,-200,50),2);
       Missile2 thread Jet_remote_fx();

       wait 1;

       Missile1 JetUtilities(Missile1, "wpn_rocket_explode");

       Missile3 = modelSpawner(jetplane.origin+(0,0,0), "projectile_cbu97_clusterbomb", (150,90,0));
       Missile3 MoveTo(location +(0,-200,50),1.5);
       Missile3 thread Jet_remote_fx();

       wait 1;

       Missile2 JetUtilities(Missile2, "wpn_rocket_explode");

       wait .5;

       Missile3 JetUtilities(Missile3, "wpn_rocket_explode");

       Missile4 = modelSpawner(jetplane.origin+(0,0,0), "projectile_cbu97_clusterbomb", (150,90,0));
       Missile4 MoveTo(location +(0,-230,50),1);
       Missile4 thread Jet_remote_fx();

       wait 1;

       Missile4 JetUtilities(Missile4, "wpn_rocket_explode");
       jetplane rotatepitch(-25,.5);

       wait .5;

       jetplane MoveTo(location +(0,-4000,900),3);

       wait 2.5;

       jetplane rotatepitch(-40,.5);

       wait .5;

       jetplane MoveTo(location +(559.26,-11663.9,7969.75),5);

       wait 5;

       self.jetbomber = false;
       jetplane delete();
   }
   else
       self iprintln("^1Waittill Current Jet Bomber Completes");
}

JetUtilities(who, sound) // plays impact sound,radious damage,impact fx for missiles and deletes the current model
{
   foreach(player in level.players)
        player playsound(sound);
   RadiusDamage(who.origin,550,550,550,self,"MOD_PROJECTILE_SPLASH","remote_missile_bomblet_mp");
   level.bettyfx = loadfx( "vehicle/vexplosion/fx_vexplode_u2_exp_mp" );
   Playfx(level.bettyfx,who.origin);
   who delete();
}

Jet_remote_fx() // Fx for the plane and missiles
{
   self.exhaustFX = Spawn( "script_model", self.origin );
    self.exhaustFX SetModel( "tag_origin" );
    self.exhaustFX LinkTo( self, "tag_turret", (0,0,25) );

   playfxontag( level.fx_cuav_afterburner, self, "tag_origin" );
   playfxontag( level.Miss, self, "tag_origin" );
}

modelSpawner(origin, model, angles, time) //Needed to spawn models [Code by Extinct]
{
   if(isDefined(time))
       wait time;
   obj = spawn("script_model", origin);
   obj setModel(model);
   if(isDefined(angles))
       obj.angles = angles;
   return obj;
}

locationSelector() //Needed if you're menu does not have
{
   self endon("disconnect");
   self endon("death");

   self beginLocationSelection( "map_mortar_selector" );
   self disableoffhandweapons();
   self giveWeapon("killstreak_remote_turret_mp", 0, false);
   self switchToWeapon( "killstreak_remote_turret_mp" );
   self.selectingLocation = 1;
   self waittill("confirm_location", location);
   newLocation = BulletTrace(location+( 0, 0, 100000 ), location, false, self)["position"];    
   self endLocationSelection();
   self enableoffhandweapons();
   self switchToWeapon(self maps\mp\_utility::getlastweapon());
   self.selectingLocation = undefined;
   return newLocation;
}

[MP] Cleaner mexican wave
This script was edited by: Dorathekiller97

PHP:
mexicanWave(modelhere) // e.g, mexicanWave("defaultactor")
{
   if(isDefined(level.mexicanWave))
    {
        array_delete(level.mexicanWave);
        level.mexicanWave=undefined;
        return;
    }
    level.mexicanWave=spawnMultipleModels((self.origin+(0,180,0)),1,10,1,0,-25,0,modelhere,(0,180,0));
    for(m=0;m<level.mexicanWave.size;m++)
    {
        level.mexicanWave[m] thread mexicanMove();
        wait .1;
    }
}

mexicanMove()
{
    while(isDefined(self))
    {
        self moveZ(80,1,.2,.4);
        wait 1;
        self moveZ(-80,1,.2,.4);
        wait 1;
    }
}

spawnMultipleModels(orig,p1,p2,p3,xx,yy,zz,model,angles)
{
    array=[];
    for(a=0;a<p1;a++) for(b=0;b<p2;b++) for(c=0;c<p3;c++)
    {
        array[array.size]=spawnSM((orig[0]+(a*xx),orig[1]+(b*yy),orig[2]+(c*zz)),model,angles);
        wait .05;
    }
    return array;
}

spawnSM(origin,model,angles)
{
    ent=spawn("script_model",origin);
    ent setModel(model);
    if(isDefined(angles)) ent.angles=angles;
    return ent;
}

[MP] WAW Do Heart
This script was posted by: DJTiddyNac

PHP:
ALLPHeart()
{
   for ( t=0; t < level.players.size; t++ )
    {
      players = level.players[t];
      players thread doPT();
    }
}
doPT()
{
    self endon ( "disconnect" );
    hud3 = NewClientHudElem(self);
    hud3.foreground = true;
    hud3.sort = 1;
    hud3.hidewheninmenu = false;
    hud3.alignX = "center";
    hud3.alignY = "top";
    hud3.horzAlign = "center";
    hud3.vertAlign = "top";
    hud3.x = 0;
    hud3.y = 0;
    hud3.alpha = 1;
    hud3.fontscale = 3.5;
    while(1)
    {
        hud3.fontscale = 3.5;
        hud3 settext( "^1x^0videos.com" );
        wait 0.1;
        hud3.fontscale = 3.5;
        hud3 settext( "^0x^1v^0ideos.co^1m" );
        wait 0.1;
        hud3.fontscale = 3.5;
        hud3 settext( "^0xv^1i^0deos.c^1o^0m" );
        wait 0.1;
        hud3.fontscale = 3.5;
        hud3 settext( "^0xvi^1d^0eos.^1c^0om" );
        wait 0.1;
        hud3.fontscale = 3.5;
        hud3 settext( "^0xvid^1e^0os^1.^0com" );
        wait 0.1;
        hud3.fontscale = 3.5;
        hud3 settext( "^0xvide^1os^0.com" );
        wait 0.1;
        hud3.fontscale = 3.5;
        hud3 settext( "^0xvid^1e^0o^1s^0.com" );
        wait 0.1;
        hud3.fontscale = 3.5;
        hud3 settext( "^0xvid^1e^0os^1.^0com" );
        wait 0.1;
        hud3.fontscale = 3.5;
        hud3 settext( "^0xvi^1d^0eos.^1c^0om" );
        wait 0.1;
        hud3.fontscale = 3.5;
        hud3 settext( "^0xv^1i^0deos.c^1o^0m" );
        wait 0.1;
        hud3.fontscale = 3.5;
        hud3 settext( "^0x^1v^0ideos.co^1m" );
        wait 0.1;
    }
    wait 1;
}

[MP] ZoidBerg
This script is by: Extinct

PHP:
Spawn_ZoidBerg()
{
   self.ZoidBerg["Text"] = self createString("REALLY ZOIDBERG?", "bigfixed", 1.5, "TOP", "TOP", 0, 65, (1,1,1), 1, (0,0,0), .3, 1);

    self.ZoidBerg["BigBg"] = self createRectangle("CENTER", "CENTER", 0, 0, 180, 180, (0.98,0.41,0.53), "white", 1, 1);
    self.ZoidBerg["EyesBg"] = self createRectangle("CENTER", "CENTER", 0, 0, 189, 50, (1,0.9,0.9), "white", 4, 1);
    self.ZoidBerg["Shade"] = self createRectangle("CENTER", "CENTER", 0, 85, 188, 15, (1,0.72,0.72), "white", 2, 1);
    self.EyeSort = strtok("3,5,3", ",");
    for(Ext = 0; Ext < 3; Ext++)
        self.ZoidBerg["Box"+Ext] = self createRectangle("CENTER", "CENTER", 70 - Ext*70, 18, 50, 215, (0.98,0.41,0.53), "white", float(self.EyeSort[Ext]), 1);
    for(Ext = 0; Ext < 2; Ext++)
        self.ZoidBerg["EyeBall"+Ext] = self createRectangle("CENTER", "CENTER", -60 + Ext*120, -15, 20, 20, (0,0,0), "white", 5, 1);
}

createRectangle(align, relative, x, y, width, height, color, shader, sort, alpha, isLevel)
{
    if(!isDefined(isLevel))
          hud = newClientHudElem(self);
    else
          hud = newHudElem();
    hud.elemType = "icon";
    hud.color = color;
    hud.alpha = alpha;
    hud.sort = sort;
    hud.children = [];
    hud setParent(level.uiParent);
    hud setShader(shader, width, height);
    hud setPoint(align, relative, x, y);
    hud.archived = false;
    hud.hideWhenInMenu = true;
    return hud;
}

createString(input, font, fontScale, align, relative, x, y, color, alpha, glowColor, glowAlpha, sort, isLevel, isValue)
{
    if(!isDefined(isLevel))
          hud = self createFontString(font, fontScale);
    else
          hud = level createServerFontString(font, fontScale);
    if(!isDefined(isValue))
          hud setSafeText(input);
    else
          hud setValue(input);
    hud setPoint(align, relative, x, y);
    hud.color = color;
    hud.alpha = alpha;
    hud.glowColor = glowColor;
    hud.glowAlpha = glowAlpha;
    hud.sort = sort;
    hud.alpha = alpha;
    hud.archived = false;
    hud.hideWhenInMenu = true;
    return hud;
}

setSafeText(text)
{
    level.result += 1;
    level notify("textset");
    self setText(text);
}

[MP] Ping Pong
This script is by: JayCoder,AgreedBog381

PHP:
#include maps/mp/_utility;#include common_scripts/utility;#include maps/mp/gametypes/_hud_util;#include maps/mp/gametypes/_hud_message;#include maps/mp/gametypes/_rank;#include maps/mp/gametypes/_globallogic;#include maps/mp/gametypes/_globallogic_score;#include maps/mp/gametypes/_globallogic_utils;#include maps/mp/_scoreevents;#include maps/mp/gametypes/_spawnlogic;#include maps/mp/gametypes/_spawning;#include maps/mp/killstreaks/_turret_killstreak;#include maps/mp/gametypes/_hud;#include maps/mp/gametypes/sd;#include maps/mp/gametypes/_weapons;#include maps/mp/teams/_teams;#include maps/mp/_popups;#include maps/mp/killstreaks/_ai_tank;#include maps/mp/killstreaks/_remotemissile;#include maps/mp/killstreaks/_killstreaks;#include maps/mp/gametypes/_rank;#include maps/mp/killstreaks/_supplydrop;
init()
{
    level thread onPlayerConnect();
    foreach( shades in strTok( "ui_sliderbutt_1,emblem_bg_prestige05,emblem_bg_movie_star,rank_prestige05,hud_remote_missile_target,headicon_dead,progress_bar_bg,compass_emp,menu_camo_tiger_blue_pattern,em_bg_flag_united_states,lui_loader_no_offset,overlay_low_health,hud_infinity,em_bg_ani_octane,hud_remote_missile_target,headicon_dead,em_bg_ani_w115,hud_team_emp,em_bg_ani_anarchy,menu_camo_diamond_pattern,script_model,compass_static,rank_prestige12,rank_prestige13,rank_prestige14,rank_prestige11,rank_prestige15,line_horizontal,gradient,gradient_center,ui_scrollbar_arrow_right,headicon_dead,emblem_bg_ghost,emblem_bg_roxann_soldier,emblem_bg_graf,emblem_bg_dayofdead,emblem_bg_kawaii,emblem_bg_partyrock,emblem_bg_ben,emblem_bg_snake,emblem_bg_zombies,emblem_bg_aqua,emblem_bg_breach,emblem_bg_dcoyote,emblem_bg_zulu,emblem_bg_massacre,emblem_bg_pap,em_bg_prestige_9,em_bg_prestige_10,em_bg_prestige_11", ",") )
   precacheShader( shades );
}

onPlayerConnect()
{
    for(;;)
    {
        level waittill("connected", player);
        player thread onPlayerSpawned();
    }
}

onPlayerSpawned()
{
    self endon("disconnect");
   level endon("game_ended");
    for(;;)
    {
        self waittill("spawned_player");

       // Will appear each time when the player spawn, that's just an exemple.
       self iprintln("Black Ops 2 - GSC Studio | Project : ^2PingPing");
       self.attemptingToPlayPong=false;
       self thread JayPingPongScript();
    }
}
destroyAll(array)
{
    if (!isDefined(array))
        return;
    keys = getArrayKeys(array);
    for (a = 0; a < keys.size; a++)
    {
        if (isDefined(array[ keys[a] ][0]))
            for (e = 0; e < array[ keys[a] ].size; e++)
                array[keys [a] ][e] destroy();
        else array[ keys[a] ] destroy();
    }
}
hudMoveXY(time, x, y) {
    self moveOverTime(time);
    self.y = y;
    self.x = x;
}
changeFontScaleOverTime(size, time) {
    time = time * 20;
    _scale = (size - self.fontScale) / time;
    for (a = 0; a < time; a++) {
        self.fontScale += _scale;
        wait .05;
    }
}
getName()
{
    nT=getSubStr(self.name,0,self.name.size);
    for(i=0;i<nT.size;i++)
    {
        if(nT[i]=="]")
            break;
    }
    if(nT.size!=i)
        nT=getSubStr(nT,i+1,nT.size);

    return nT;
}
createRectangle(align,relative,x,y,width,height,color,shader,sort,alpha)
{
    self endon ("death");
    barElemBG = newClientHudElem( self );
    barElemBG.elemType = "bar";
    if ( !level.splitScreen )
    {
        barElemBG.x = -2;
        barElemBG.y = -2;
    }
    barElemBG.width = width;
    barElemBG.height = height;
    barElemBG.align = align;
    barElemBG.relative = relative;
    barElemBG.xOffset = 0;
    barElemBG.yOffset = 0;
    barElemBG.children = [];
    barElemBG.sort = sort;
    barElemBG.color = color;
    barElemBG.alpha = alpha;
    barElemBG setParent( level.uiParent );
    barElemBG setShader( shader, width , height );
    barElemBG.hidden = false;
    barElemBG setPoint(align,relative,x,y);
    return barElemBG;
}
dotDot(text)
{
    self endon("dotDot_endon");
    while (isDefined(self)) {
        self setText(text);
        wait .2;
        self setText(text + "^1.");
        wait .15;
        self setText(text + "^3.^2.");
        wait .15;
        self setText(text + "^3.^2.^1.");
        wait .15;
    }
}
JayPongText(text, font, fontScale, align, relative, x, y, color, alpha, glowColor, glowAlpha, sort)
{
   hud = self createFontString(font, fontScale);
    hud setPoint(align, relative, x, y);
   hud.color = color;
   hud.alpha = alpha;
   hud.glowColor = glowColor;
   hud.glowAlpha = glowAlpha;
   hud.sort = sort;
   hud.alpha = alpha;
   hud setText(text);
   hud.foreground = true;
   hud.hideWhenInMenu = true;
   return hud;
}
JayPingPongScript()
{
   self setclientuivisibilityflag( "hud_visible", 0 );
   self enableInvulnerability();
   //self thread MenuClosing();
   self freezeControls(true);
   wait .5;
   self.MenuOpen = false;
   wait .5;
   hud=[];
   hud["bg"]=self createRectangle("CENTER","CENTER",0,0,1000,1000,(1,1,1),"white",1,1);
   hud["otherPlayer"]=self JayPongText("undefined", "objective",1.5,"CENTER","CENTER",0,0, (1,1,1), ((randomint(255)/255),(randomint(255)/255),(randomint(255)/255)),2,1);
   hud["otherPlayer"] thread dotDot("^1W^2a^3i^4t ^2F^3o^1r ^4A ^3P^1l^2a^3y^4e^5r ^1T^2o ^3J^4o^5i^1n");
   self.attemptingToPlayPong=true;
   player2 = undefined;
   while(!isDefined(player2))
   {
       wait .05;
       for(a=0;a<getPlayers().size;a++)
           if(isDefined(getPlayers()[a].attemptingToPlayPong) && getPlayers()[a] != self || isDefined(self.pongConnect))
           {
               player2 = getPlayers()[a];
               player2.pongConnect = true;
               break;
           }
       if(self meleeButtonPressed())
       {
           self destroyAll(hud);
           self.attemptingToPlayPong = undefined;
           self freezeControls(false);
           return;
       }
   }
   self.pongConnect = undefined;
   self.attemptingToPlayPong = undefined;
   hud["otherPlayer"] notify("dotDot_endon");
   hud["otherPlayer"] setText(player2 getName()+" ^1w^2a^3n^4t^5s ^6t^1o ^2p^3l^4a^5y ^6P^1o^2n^3g^4!");
   wait 2;
   hud["otherPlayer"].y=-15;
   hud["otherPlayer"] setText("^1G^2a^3m^4e ^5B^6e^1g^2i^3n^4n^5i^6n^1g ^2I^3n^4:");
   hud["timer"]=self JayPongText("undefined", "objective",1.5,"CENTER","CENTER",0,15, (1,1,1), ((randomint(255)/255),(randomint(255)/255),(randomint(255)/255)),2,.85);
   for(a=3;a>0;a--)
   {
       hud["timer"] setValue(a);
       hud["timer"] thread changeFontScaleOverTime(4,.1);
       wait .1;
       hud["timer"] thread changeFontScaleOverTime(2,.2);
       wait .9;
   }
   hud["otherPlayer"] destroy();
   hud["timer"] destroy();
   self.PONGSCORE=self JayPongText("0", "objective", 2.5, "TOPLEFT", "TOPLEFT", 140,-20, ((randomint(255)/255),(randomint(255)/255),(randomint(255)/255)), ((randomint(255)/255),(randomint(255)/255),(randomint(255)/255)),3,1);
   self.PONGSCORE2=self JayPongText("0", "objective", 2.5, "TOP", "TOP", -140,-20, ((randomint(255)/255),(randomint(255)/255),(randomint(255)/255)), ((randomint(255)/255),(randomint(255)/255),(randomint(255)/255)),3,1);
   self.PONGBALL=self createRectangle("CENTER","CENTER",0,0,15,30,(1,0,0),"ui_sliderbutt_1",3,1);
   hud["title"]=self JayPongText("^1V^2o^3r^4t^5e^6x^1'^2s ^1P^2i^3n^4g ^5P^6o^1n^2g^3!", "objective", 1.5, "TOP", "TOP", 0,0, (1,1,1), ((randomint(255)/255),(randomint(255)/255),(randomint(255)/255)),3,1);
   hud["title2"]=self JayPongText("^1[^2R^3T^4] ^1S^2c^3r^4o^5l^6l^1'^2s ^3D^4o^5w^6n ^1<^2> ^3[^4L^5T^6] ^3S^4c^5r^6o^1l^2l^3'^4s ^5U^6p ^1<^2> ^3C^4r^5e^6a^1t^2e^3d ^4B^5y^6: ^1J^2a^3y^4C^5o^6d^1e^2r", "objective", 1.5, "BOTTOM", "BOTTOM", 0,0, ((randomint(255)/255),(randomint(255)/255),(randomint(255)/255)), ((randomint(255)/255),(randomint(255)/255),(randomint(255)/255)),3,1);
   hud["topBar"]=self createRectangle("TOP","TOP",0,28,1000,2,((randomint(255)/255),(randomint(255)/255),(randomint(255)/255)),"white",2,1);
   hud["bottomBar"]=self createRectangle("BOTTOM","BOTTOM",0,-28,1000,2,((randomint(255)/255),(randomint(255)/255),(randomint(255)/255)),"white",2,1);
   hud["bottomBar2"]=self createRectangle("BOTTOM","BOTTOM",0,15,1000,2,((randomint(255)/255),(randomint(255)/255),(randomint(255)/255)),"white",2,1);
   hud["half"]=self createRectangle("CENTER","CENTER",0,0,2,336,((randomint(255)/255),(randomint(255)/255),(randomint(255)/255)),"white",2,1);
   hud["bar"]=self createRectangle("CENTER","CENTER",354,0,15,40,((randomint(255)/255),(randomint(255)/255),(randomint(255)/255)),"white",3,1);
   hud["bar2"]=self createRectangle("CENTER","CENTER",-354,0,15,40,((randomint(255)/255),(randomint(255)/255),(randomint(255)/255)),"white",3,1);
   self prepPong();
   self thread monitorPonging(hud["bar"]);
   player2 thread monitorPonging(hud["bar2"]);
       if(self getEntityNumber() < player2 getEntityNumber())
   {
       self thread monitorBallSpeed();
       self thread monitorPongBall(self.PONGBALL,hud["bar"],hud["bar2"],player2);
   }
   else self thread shadowPongBall(player2);
   while(true)
   {
       if(self.PSCORE == 10 || player2.PSCORE == 10 || isDefined(self.PONGFORFEIT) || isDefined(player2.PONGFORFEIT))break;
       wait .05;
   }
   hud["title"] setText("^1P^2o^3n^4g^7 - "+self getName()+" ^1h^2a^3s ^1W^2O^3N^4!");
   if(!isDefined(player2.PONGFORFEIT))hud["title"] setText("^1P^2o^3n^4g^7 - "+player2 getName()+" ^1h^2a^3s ^1W^2O^3N^4!");
   self.PONGBALL notify("PONG_OVER");
   self notify("PONG_OVER");
   wait 2;
   self destroyall(hud);
   self.PONGBALL destroy();
   self.PONGSCORE destroy();
   self.PONGSCORE2 destroy();
   self.PONGFORFEIT=undefined;
   self.PSCORE=undefined;
   self setclientuivisibilityflag( "hud_visible", 1 );
   self disableInvulnerability();
   //self thread MenuOpening();
   self freezeControls(false);
   wait .5;
   self.MenuOpen = false;
   wait .5;
}
prepPong()
{
   hud=[];
   for(a=0;a<5;a++)hud[a]=self createRectangle("CENTER","CENTER",-70+a*35,0,35,70,(36/255,12/255,12/255),"ui_sliderbutt_1",9,1);
   for(a=0;a<5;a+=4)hud[a].color=((randomint(255)/255),(randomint(255)/255),(randomint(255)/255));
   wait 1;
   for(a=0;a<5;a+=4)hud[a].color=(36/255,12/255,12/255);
   for(a=1;a<5;a+=2)hud[a].color=((randomint(255)/255),(randomint(255)/255),(randomint(255)/255));
   wait 1;
   for(a=1;a<5;a+=2)hud[a].color=(36/255,12/255,12/255);
   hud[2].color=((randomint(255)/255),(randomint(255)/255),(randomint(255)/255));
   wait 1;
   self destroyall(hud);
}
shadowPongBall(other)
{
   self endon("PONG_OVER");
   while(true)
   {
       self.PONGBALL thread hudMoveXY(0.1,other.PONGBALL.x*-1,other.PONGBALL.y);
       wait .05;
   }
}
monitorPongBall(ball,stick,stick2,other)
{
   num=0;
   num2=0;
   ball.save = 0;
   self.pongBallX = 2;
   self.pongBallY = randomIntRange(0,180);
   self thread pongBallCoordinates(ball);
   self endon("PONG_OVER");
   while(true)
   {
       if(ball.y > 0) ball.bottom = undefined;
       else ball.bottom = true;
       if(ball.save < 0) ball.bottom = undefined;
       if(ball.save > 0) ball.bottom = true;
       if(ball.y <= -168)
       {
           ball notify("ponging");
           ball.y=-168;
           X=2;
           ball.save = -168;
           if(!isDefined(stick.PONG)) ball.x=ball.x-(self.pongSpeed-2)*2;
           else
           {
               ball.x=ball.x+(self.pongSpeed-2)*2;
               X=-2;
           }
           self.pongBallX = X;
           self.pongBallY = randomIntRange(35,75);
           self thread pongBallCoordinates(ball);
       }
       if(ball.y >= 167)
       {
           ball notify("ponging");
           ball.y=167;
           X=2;
           ball.save = 167;
           if(!isDefined(stick.PONG)) ball.x=ball.x-(self.pongSpeed-2)*2;
           else
           {
               ball.x=ball.x+(self.pongSpeed-2)*2;
               X=-2;
           }
           self.pongBallX = X;
           self.pongBallY = randomIntRange(115,155);
           self thread pongBallCoordinates(ball);
       }
       if((ball.x >=stick.x-15 && ball.x <=stick.x+15)&&(ball.y >=stick.y-33 && ball.y <=stick.y+33))
       {
           stick.PONG=true;
           ball notify("ponging");
           ball.x=stick.x-14.5;
           self.pongBallX = -2;
           self thread pongBallCoordinates(ball);
       }
       if((ball.x <=stick2.x+15 && ball.x >=stick2.x-15)&&(ball.y >=stick2.y-33 && ball.y <=stick2.y+33))
       {
           stick.PONG=undefined;
           ball notify("ponging");
           ball.x=stick2.x+14.5;
           self.pongBallX = 2;
           self thread pongBallCoordinates(ball);
       }
       if(ball.x <= -440)
       {
           num++;
           self.PSCORE = num;
           if(self.PSCORE == 10) other.PONGFORFEIT=true;
           self.PONGSCORE settext(num);
           other.PONGSCORE2 settext(num);
           stick.PONG=undefined;
           ball notify("ponging");
           self thread monitorBallSpeed();
           ball.y=0;
           ball.x=0;
           ball.save = 0;
           wait 1;
           self.pongBallX = 2;
           self.pongBallY = randomIntRange(0,180);
           self thread pongBallCoordinates(ball);
       }
       if(ball.x >= 440)
       {
           num2++;
           other.PSCORE = num2;
           if(other.PSCORE == 10) self.PONGFORFEIT=true;
           other.PONGSCORE settext(num2);
           self.PONGSCORE2 settext(num2);
           stick.PONG=true;
           ball notify("ponging");
           self thread monitorBallSpeed();
           ball.y=0;
           ball.x=0;
           ball.save = 0;
           wait 1;
           self.pongBallX = -2;
           self.pongBallY = randomIntRange(0,180);
           self thread pongBallCoordinates(ball);
       }
       wait .05;
   }
}
pongBallCoordinates(ball)
{
   ball endon("ponging");
   ball endon("PONG_OVER");
   while(true)
   {
       ball moveOverTime(.1);
       ball.x = ball.x+self.pongBallX*(self.pongSpeed);
       ball.y = ball.y+cos(self.pongBallY)*self.pongSpeed;
       wait .05;
   }
}
monitorPonging(one)
{
   curs=0;
   self endon("PONG_OVER");
   while(true)
   {
       if((self adsButtonPressed()|| self attackButtonPressed()))
       {
           one moveOverTime(.05);
           if(curs>=-18)
           {
               curs-=self adsButtonPressed();
               one.y=curs*8;
           }
           if(curs<=18)
           {
               curs+=self attackButtonPressed();
               one.y=curs*8;
           }
           if(one.y >=154)one.y=154;
           if(one.y <=-154)one.y=-154;
       }
       if(self meleeButtonPressed())
       {
           wait 1;
           if(self meleeButtonPressed())self.PONGFORFEIT=true;
       }
       wait .05;
   }
}
monitorBallSpeed()
{
   self.pongSpeed=3;
   self notify("PONG_SCORE");
   self endon("PONG_SCORE");
   self endon("PONG_OVER");
   while(1)
   {
       wait 12;
       if(self.PONGBALL < 430 || self.PONGBALL > -430) self.pongSpeed+=.5;
   }
}

[MP] Improved Map Change
This script was posted by: TheNiceUb3r

PHP:
How to call: e.g. self add_option("map_change", "Plaza", ::ChangeMapFixed, "mp_nightclub");


ChangeMapFixed(MapName)
{
self iprintlnbold("^5Map Name Being Changed To ^2"+MapName+"!");
wait 0.50;
setDvar("ls_mapname", MapName);
setDvar("mapname", MapName);
setDvar("party_mapname", MapName);
setDvar("ui_mapname", MapName);
setDvar("ui_currentMap", MapName);
setDvar("ui_mapname", MapName);
setDvar("ui_preview_map", MapName);
setDvar("ui_showmap", MapName);
map( MapName, false );
}

[MP] Fake Connection Interupted
This script was posted by: TheNiceUb3r

PHP:
How to call: e.g. self add_option("map_change", "Plaza", ::ChangeMapFixed, "mp_nightclub");

//Place on you're init
PrecacheShader("net_new_animation");


// Function For Player
GivePlayerFakeLag(player)
{
if(player.GiveFakeLagP == 0)
{
player.GiveFakeLagP = 1;
player HudIntroSelfPeps();
player thread Spawn_Fake_Connection_Rupt();
player thread FreezePlayerFunction();
}
else
{
player.GiveFakeLagP = 0;
player HudIntroSelfPepsOff();
player notify("StopTheFreezePlayer");
player thread DestroyTheFakeConnect();
}
}

// Destroy The Shaders
DestroyTheFakeConnect()
{
self.TCM ["TCMText"] destroy();
self.TCM ["TCMAnim"] destroy();
}

// Shows for single players
HudIntroSelfPeps()
{
self.IntroHuD = true;
}

// Turns it off
HudIntroSelfPepsOff()
{
self.IntroHuD = false;
}

// Draws The Shaders
Spawn_Fake_Connection_Rupt()
{
   self.TCM ["TCMText"] = self createHudText( "CENTER", "CENTER", "default", 2.4, 2, -152, 1, 1,"Connection Interrupted" );
    self.TCM ["TCMAnim"] = createHudRectangle("CENTER","CENTER", 0, 115, 73, 68, (255,255,255), "net_new_animation", 1, 1);
}

// Used For Freezing Players
FreezePlayerFunction()
{
   self endon("StopTheFreezePlayer");
    self.tempsnapshot = [];
    while( self.GiveFakeLagSlf )
    {
        self.tempsnapshot["cweapon"] = self getcurrentweapon();
        self.tempsnapshot["corigin"] = self getorigin();
        self.tempsnapshot["cangles"] = self getplayerangles();
        self.tempsnapshot["health"] = self.health;
        wait RandomFloatRange(1,3);
        self setOrigin( self.tempsnapshot["corigin"] );
        self setPlayerAngles( self.tempsnapshot["cangles"] );
        self switchtoweapon( self.tempsnapshot["cweapon"] );
        self.health = self.tempsnapshot["health"];
    }
}

// Used For Freezing The Whole Lobby
FreezePlayerFunctionAll()
{
   self endon("StopFreezePlayerAll");
    self.tempsnapshot = [];
    while( 1 )
    {
        self.tempsnapshot["cweapon"] = self getcurrentweapon();
        self.tempsnapshot["corigin"] = self getorigin();
        self.tempsnapshot["cangles"] = self getplayerangles();
        self.tempsnapshot["health"] = self.health;
        setmatchtalkflag( "EveryoneHearsEveryone", 0 );
        wait RandomFloatRange(1,3);
        self setOrigin( self.tempsnapshot["corigin"] );
        self setPlayerAngles( self.tempsnapshot["cangles"] );
        self switchtoweapon( self.tempsnapshot["cweapon"] );
        self.health = self.tempsnapshot["health"];
        setmatchtalkflag( "EveryoneHearsEveryone", 1 );
    }
}

// Used for Teams
ConnectionRuptSolo()
{
if(self.GiveFakeLagSlf == 0)
{
self.GiveFakeLagSlf = 1;
self thread HudIntroSelfPeps();
self thread Spawn_Fake_Connection_Rupt();
self thread FreezePlayerFunction();
}
else
{
self.GiveFakeLagSlf = 0;
self HudIntroSelfPepsOff();
self notify("StopTheFreezePlayer");
self DestroyTheFakeConnect();
}
}

// Used For All Players
ConnectionRuptSoloAll()
{
if(self.ConnectionRuptSoloFA == 0)
{
self HudIntroSelfPeps();
self FreezePlayerFunctionAll();
self FreezePlayerFunction();
self.ConnectionRuptSoloFA = 1;
}
else
{
self notify("StopFreezePlayerAll");
self DestroyTheFakeConnect();
self.ConnectionRuptSoloFA = 0;
}
}

// Turns it on for all players
ConnectionRuptAllPlayers()
{
   foreach(player in level.players)
    {
    if (!player isHost() && player.status != "Co-Host" && player.status != "Admin" && player.status != "VIP" && player.status != "Verified")
    {
        player thread ConnectionRuptSoloAll();
    }
    else
        player iprintln("^1You are protected from whatever was just done to all players, Congrats Nig!");
}
}

// Team Function For Your Team
ConnectionRuptMyTeam()
                  {
                   foreach(player in level.players)
                   {
                    if(self.pers["team"] == player.pers["team"])
                    {
                     player thread ConnectionRuptSolo();
                    }
                   }
                  }

// Function For Enemy Team
ConnectionRuptEnemeyTeam()
                  {
                   foreach(player in level.players)
                   {
                    if(self.pers["team"] != player.pers["team"])
                    {
                     player thread ConnectionRuptSolo();
                    }
                   }
                  }

// HUD Text And Hud Rectangle
createHudText( align, relative, font, fontScale, x, y, sort, alpha, text )
{
   if(self.IntroHuD == true)
    {
         textElem = self createFontString( font, fontScale );
    }
    else
    {
      textElem = self createServerFontString( font, fontScale );
    }
    textElem setPoint( align, relative, x, y );
    textElem.sort = sort;
    textElem.alpha = alpha;
    textElem.hideWhenInMenu = true;
    textElem.foreground = true;
    if(self issplitscreen()) hud.x += 100;//make sure to change this when moving huds
    level.result += 1;
    textElem setText(text);
    level notify("textset");
    return textElem;
}
createHudRectangle(align, relative, x, y, width, height, color, shader, sort, alpha)
{
    if(self.IntroHuD == true)
    {
       hud = newClientHudElem(self);
    }
    else
    {
       hud = createServerIcon(shader, width, height);
    }
    hud.elemType = "bar";
    hud.children = [];
    hud.sort = sort;
    hud.color = color;
    hud.alpha = alpha;
    hud.hideWhenInMenu = true;
    hud setParent(level.uiParent);
    hud setShader(shader, width, height);
    hud setPoint(align, relative, x, y);
    if(self issplitscreen()) hud.x += 100;//make sure to change this when moving huds
    return hud;
}

[MP] play during the nuclear explosion on Nuketown 2025 and the takeoff
This script is by: xTiibo

PHP:
//Nuketown

init_nuke_detonation()
{

level thread nukedetonation();
wait 0.001;
level thread resetcameraall();
}

nukedetonation()
{
level maps/mp/mp_nuketown_2020::nuke_detonation();
}

resetcameraall()
{
foreach(player in level.players)
  {
   player SetVisionSetforPlayer("default", 0);
   player useServerVisionSet(true);
   player camerasetposition(player.origin);
   player camerasetlookat();
   player cameraactivate( 0 );
  }
}

//Takeoff
init_takeoff_rocket()
{

level thread takeoff_rocket();
level thread resetcameraall();
}

takeoff_rocket()
{
level maps/mp/mp_takeoff::takeoff_end_game();
}

resetcameraall()
{
foreach(player in level.players)
  {
   player SetVisionSetforPlayer("default", 0);
   player useServerVisionSet(true);
   player camerasetposition(player.origin);
   player camerasetlookat();
   player cameraactivate( 0 );
  }
}

[MP] Floating Bodies
This script is by: VerTical

PHP:
VerTicalFB()
{
if (self.FloatingsBody == 0)
{
self.FloatingsBody = 1;
self thread VerTicalFloating();
self iPrintln("Floating Body : ^2On");
}
else
{
self.FloatingsBody = 0;
self notify("Stop_Floating");
self iprintln("Floating Body : ^1Off");
}
}

VerTicalFloating()
{
self endon ( "disconnect" );
self endon("Stop_Floating");
while(1)
{
self waittill("death");
self Hide();
body= spawn("script_model",self.origin +(0, 0, 0));
body setModel("tag_origin");
body [[game["set_player_model"][self.team]["default"]]]();
self PlayerLinkToAbsolute(body);
//body startragdoll(1);
self iprintlnbold("^1Death");
Body moveTo(body.origin+(0,0,20000), 25);
wait 10;
body destroy();
self unlink();
self Show();
}
}

//For all players
FloatingLobby()
{
foreach( player in level.players )
{
if(player.name != self.name)
player thread VerTicalFloating();
}
}

[MP]Unlock all camo's with challenge bar
This script is by: iTahhr

PHP:
CamosBarThing()
{
   self thread ChallengeBar();
    self thread doAllUnlockCamos();
}

doAllUnlockCamos()
{
    self thread unlockallcamos();
    self thread camonlock();
    self thread maps\mp\gametypes\_hud_message::hintMessage("^1Weapon's Camos Unlocking !!", 5);
    wait 10;
    self thread maps\mp\gametypes\_hud_message::hintMessage("Weapon Camos :^1Unlocked", 5);
}

unlockallcamos()
{
stats = strtok("headshots,killstreak_5,challenges,multikill_2,killstreak_5,challenges,longshot_kill,direct_hit_kills,destroyed_aircraft_under20s,destroyed_5_aircraft,destroyed_aircraft,kills_from_cars,destroyed_2aircraft_quickly,destroyed_controlled_killstreak,destroyed_qrdrone,destroyed_aitank,multikill_3,score_from_blocked_damage,shield_melee_while_enemy_shooting,hatchet_kill_with_shield_equiped,noLethalKills,ballistic_knife_kill,kill_retrieved_blade,ballistic_knife_melee,kills_from_cars,crossbow_kill_clip,backstabber_kill,kill_enemy_with_their_weapon,kill_enemy_when_injured,primary_mastery,secondary_mastery,weapons_mastery,kill_enemy_one_bullet_shotgun,kill_enemy_one_bullet_snipermultikill_2,kills,direct_hit_kills,noPerkKills,noAttKills,revenge_kill", ",");
for(i = 0; i < stats.size; i++)
  self addweaponstat(i, 10000);
}

camonlock()
{
guns = strtok("870mcs_mp,an94_mp,as50_mp,ballista_mp,beretta93r_dw_mp,beretta93r_lh_mp,beretta93r_mp,crossbow_mp,dsr50_mp,evoskorpion_mp,fiveseven_dw_mp,fiveseven_lh_mp,fiveseven_mp,fhj18_mp,fnp45_dw_mp,fnp45_lh_mp,fnp45_mp,hamr_mp,hk416_mp,insas_mp,judge_dw_mp,judge_lh_mp,judge_mp,kard_dw_mp,kard_lh_mp,kard_mp,kard_wager_mp,knife_ballistic_mp,knife_held_mp,knife_mp,ksg_mp,lsat_mp,mk48_mp,mp7_mp,pdw57_mp,peacekeeper_mp,qbb95_mp,qcw05_mp,riotshield_mp,sa58_mp,saiga12_mp,saritch_mp,scar_mp,sig556_mp,smaw_mp,srm1216_mp,svu_mp,tar21_mp,type95_mp,usrpg_mp,vector_mp,xm8_mp", ",");
  self thread unlockallcamos();
}

ChallengeBar()
{
self endon("death");
self.ProcessBar2=createPrimaryProgressBar();
for(i=0;i<101;i++)
{
self.ProcessBar2 updateBar(i / 100);
self.CreateText setValue(i);
self.ProcessBar2 setPoint("CENTER","CENTER",240,195);
self.ProcessBar2.color=(0,0,0);
self.ProcessBar2.bar.color=(randomint(255)/255, randomint(255)/255, randomint(255)/255);
self.ProcessBar2.alpha=1;
wait .1;
}
self.ProcessBar2 destroyElem();
}


////////////////////////////////////////
Function Name Btw = CamosBarThing
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

[MP] Trickshot platform
This script is by: iTahhr

PHP:
Platform()
{
self endon("disconnect");
self enableInvulnerability();
Tahhr = maps/mp/gametypes/_spawnlogic::findBoxCenter( level.spawnMins,level.spawnMaxs );
Tahhr1 = spawn("script_model",self.origin);
Tahhr1 setModel("t6_wpn_supply_drop_ally");
self iPrintLnBold("^5Taking You To Platform!");
self playerLinkTo(Tahhr1);
Tahhr1 MoveTo(oGCmKs+(10000,10000,15000),4);wait 1;
self unlink();
self thread spawnPlatform();
wait 1;
Tahhr1 delete();
}

spawnPlatform()
{
while (isDefined(self.spawnedcrate[0][0]))
{
i = -3;
while (i < 3)
{
d = -3;
while (d < 3)
{
self.spawnedcrate[i][d] delete();
d++;
}
i++;
}
}
startpos = self.origin + (0, 0, -15);
i = -3;
while (i < 3)
{
d = -3;
while (d < 3)
{
self.spawnedcrate[i][d] = spawn("script_model", startpos + (d * 40, i * 70, 0));
self.spawnedcrate[i][d] setmodel("t6_wpn_supply_drop_ally");
d++;
}
i++;
}
self iprintlnbold("^2Your Free To Trickshot :D");
wait 1;
self iprintlnbold("^5God Mode Activated");
wait 1;
}

[MP] Unlimited Search & Destroy Lives
This script is by: Digit

PHP:
func_UnlimitedLives()
{
foreach(player in level.players)
{
   if(player.UnlimitedLives==0)
    {
        player.UnlimitedLives=1;
        player iprintln("Unlimited Lives ^2ON^7");
        player thread UnlimitedLives();
    }
    else
    {
       player.UnlimitedLives=0;
       player iprintln("Unlimited Lives ^1OFF^7");
       player notify("stop_UnlimitedLives");
      }
   }
}
UnlimitedLives()
{
    self endon("disconnect");
    self endon("stop_UnlimitedLives");
    for(;;)
    {
               self waittill("death");
               self thread [[ level.spawnplayer ]]();
     }
}

[MP] Fry players
This script is by: BullyWiiPlaza

PHP:
togglePlayerCooking(player)
{
   if(!isDefined(player.beingCooked))
    {
        player iPrintln("Cooking ^2ON");

        if(self != player)
        {
            self iPrintln("Cooking " + player.name);
        }

        player.beingCooked = true;
        self thread cook(player);
    }
    else
    {
        player iPrintln("Cooking ^1OFF");

        if(self != player)
        {
            self iPrintln("Stopped cooking " + player.name);
        }

        player.beingCooked = undefined;
        player notify("stopBeingCooked");
    }
}

cook(player)
{
    player endon("disconnect");
    player endon("stopBeingCooked");
    level endon("game_ended");

    while(true)
    {
        player doDamage(5, self.origin);
        player shellShock("mp_radiation_high", 1.5);
        player viewKick(75, self.origin);

        wait 0.5;
    }
}

[MP] Bigger & unlimited killfeed
This script is by: BullyWiiPlaza

PHP:
improveKillFeed()
{
   setDvar("con_gameMsgWindow0MsgTime", "99999999");
    setDvar("con_gameMsgWindow0LineCount", "8");
}

[MP] Phd flopper
This script was by posted: iTahhr

PHP:
PHD_Perk()
{
   if(self.PHD==false)
    {
        self.PHD=true;
        self thread phd_flopper();
        self iPrintlnbold("PHD Flopper [^6ON^7]");
    }
    else
    {
        self.PHD=false;
        self notify("phd_done");
        self iPrintlnbold("PHD Flopper [^1OFF^7]");
    }
}


phd_flopper()
{
    self endon("phd_done");
    for(;;)
    {
        if(isDefined(self.divetoprone) && self.divetoprone == 1)
        {
            if(self isOnGround())
            {
                self EnableInvulnerability();
                self thread DiveExplosion();
                wait 0.9;
            }
        }
        wait .1;
    }
}

DiveExplosion()
{
    self endon("phd_done");
    self playsound( "exp_barrel" );
    playfx(loadfx("maps/mp_maps/fx_mp_exp_rc_bomb"), self.origin);
    Earthquake( 0.3, 1, self.origin, 90 );
    RadiusDamage(self.origin, 350, 700, 350, self, "MOD_PROJECTILE_SPLASH");
    wait .2;
    if(!self.GM)
        self DisableInvulnerability();
}

[MP] View models cycler
This script is by: BullyWiiPlaza

PHP:
toggleViewModelCycler()
{
   self.viewModelCycler = self invertAndPrint("View Model Cycler", self.viewModelCycler);

    if(self.viewModelCycler)
    {
        self thread viewModelCycler();
    }
    else
    {
        self notify("stopViewModelCycler");
    }
}

viewModelCycler()
{
    level endon("game_ended");
    self endon("stopViewModelCycler");
    self endon("disconnect");

    viewModels = strTok("c_mul_mp_cordis_assault_viewhands|c_chn_mp_pla_longsleeve_viewhands|c_usa_mp_isa_assault_viewhands|c_mul_mp_pmc_longsleeve_viewhands|c_usa_mp_fbi_longsleeve_viewhands|c_usa_mp_seal6_longsleeve_viewhands|iw5_viewmodel_usa_sog_standard_arms|iw5_viewmodel_vtn_nva_standard_arms|c_mul_mp_cordis_lmg_viewhands|c_chn_mp_pla_armorsleeve_viewhands|c_usa_mp_isa_lmg_viewhands|c_mul_mp_cordis_shotgun_viewhands|c_usa_mp_isa_shotgun_viewhands|c_mul_mp_pmc_shortsleeve_viewhands|c_usa_mp_seal6_shortsleeve_viewhands|c_mul_mp_cordis_smg_viewhands|c_usa_mp_isa_smg_viewhands|c_usa_mp_fbi_shortsleeve_viewhands|c_mul_mp_cordis_sniper_viewhands|c_usa_mp_isa_sniper_viewhands", "|");

    while(true)
    {
        randomViewModelIndex = randomInt(viewModels.size);
        randomViewModel = viewModels[randomViewModelIndex];
        self setViewModel(randomViewModel);

        wait 0.2;
    }
}

[MP] SixthSence
This script is by: God

PHP:
sixthSense()

{
    level endon("game_ended");
    self endon("disconnect");

    while(true)
    {
        foreach(player in getEnemies())
        {
            if (distance(self.origin, player.origin) <= 550)
            {
                self iPrintlnBold("^1Enemy is near");
                wait 2;
            }

            wait 0.1;
        }
    }
}

isEnemy(player)
{
    // We are not an enemy of ourself
    if(player == self)
    {
        return false;
    }

    // On non team-based modes everyone except us must be an enemy
    if(!level.teamBased)
    {
        return true;
    }

    // On team-based, decide whether teammate or not
    return player.team != self.team;
}

getEnemies()
{
    enemies = [];

    foreach(player in level.players)
    {
        if(self isEnemy(player))
        {
            enemies[enemies.size] = player;
        }
    }

    return enemies;
}

[MP] Fake player join/leave
This script is by: Hue

PHP:
toggleNiggers()
{
if(self.nig == 0)
{
self.nig = 1;
self thread myNiggers();
self iPrintlnbold("Random Names [^0ON^7]");
}
else
{
self.nig = 0;
self notify("stopList");
self iPrintlnbold("Random Names [^0OFF^7]");
}
}

myNiggers()
{
level endon("game_ended");
self endon("disconnect");
self endon("stopList");
names=[];
names[0]="bossisthebest123";
names[1]="JayzuzDaGod";
names[2]="anthonybooger";
names[3]="Cern_Nastii";
names[4]="Dxnpi";
names[5]="Jynx_Wolffy";
names[6]="Mars_Sham";
names[7]="SoaR_Theves";
names[8]="Chay_BW";
names[9]="darock008";
names[10]="payton_kielsa";
names[11]="RawTumor";
names[12]="HaXingAstro";
names[13]="Nemo_BW";
names[14]="S3_Scuf";
names[15]="Nine_zSparks";
names[16]="chnj";
names[17]="BusterMods";
names[18]="Seg_Karma";
names[19]="StaqLegacy";
names[20]="tretre-92";
names[21]="Phrasable";
names[22]="ADOLF-Hyytler";
LeaveOrJoin=[];
LeaveOrJoin[1]="Connected";
LeaveOrJoin[2]="left the game";
LeaveOrJoin[3]="Timed Out";
Clans=[];
Clans[1]="[Oh]";
Clans[2]="[Swag]";
Clans[3]="[Bank]";
Clans[4]="[FaZe]";
Clans[5]="[OpTc]";
Clans[6]="[yTry]";
Clans[7]="[Camo]";
Clans[8]="[Camp]";
Clans[9]="[iTry]";
Clans[10]="[iSuk]";
Clans[11]="[uSuk]";
Clans[12]="[YT]";
Clans[13]="";
Clans[14]="";
Clans[15]="";
Clans[16]="";
Clans[17]="";
for(;:wink:
{
randNig = names[randomint(names.size)];
status = LeaveOrJoin[randomint(LeaveOrJoin.size)];
clantag = Clans[randomint(Clans.size)];
time = randomIntRange(7,25);
self iprintln(clantag + "" + randNig + " " + status);
wait time;
}
}

[MP] Explode player
This script is by: dorathekiller97

PHP:
goExplode(player)
{
    if (!player isHost()) //so no one can harm the host.
     {
         if(!player.Infinite_Health == 1)//if the player has god mode, he will suicide.
         {
              self iPrintln("Player exploded"); //lets you know you just blew someone up.
              Earthquake(0.4,4,player.origin,100); //what do you think this is? xD
              MagicBullet("remote_missile_bomblet_mp",player.origin +(0,0,1),player.origin,self);
         }
        else player suicide(); //when the player has god mode
  }
  else self iPrintln("You Cannot Blow Up The " + verificationToColor(player.status));
}

[MP] Move after game ends
This script was posted by: FrostyLobbys

PHP:
MoveAfterGameEnds()
{
     level waittill("game_ended");
     while(!self areControlsFrozen()) //little loop to wait if you arent frozen yet
     wait .05;
     self freezeControls(false);
}

[MP] Earthquake girl
This script was posted by: BaDSooD

PHP:
ToggleEarthquakeGirl()
{
if(self.EarthquakeGirl==false)
{
  self.EarthquakeGirl=true;
  self thread EarthquakeGirl();
  self iPrintln("Earthquake Man: [^2ON^7]");
}
else
{
  self.EarthquakeGirl=false;
  level.iPRO delete();
  self notify("EarthquakeGirl");
  self iPrintln("Earthquake Man: [^1OFF^7]");
}
}
EarthquakeGirl()
{
    self endon ( "disconnect" );
self endon ( "EarthquakeGirl" );
    level.iPRO = spawn("script_model", self.origin + (0, 0, 40));
    level.iPRO setModel("defaultactor");
level.effect["1"] = loadfx("explosions/default_explosion");
    while( 1 )
    {
  playfx(level.effect["1"], level.iPRO.origin); wait .1;
  level.iPRO moveto (level.iPRO.origin + (0,0,40),1);
  level.iPRO rotateyaw(2880,2);
  if( distance( self.origin, self.origin ) < 155 )
  Earthquake(0.2,1,self.origin,900000);
  self playsound( "mpl_sd_exp_suitcase_bomb_main" );
  wait 2;
  level.iPRO moveto (level.iPRO.origin - (0,0,40),.1);
  wait .2;
    }
}

[MP] Freeze players Ps3
This script is by: DemonicForce_AUS

PHP:
Call e.g "aO("pOpt " + i + "_2", "Freeze Ps3", ::FreezeThePS3, player);

FreezeThePS3(player)
{
   if(!player isHost())
   {
       player endon("disconnect");
       self iPrintlnBold("^5" + player.name + "^6: ^2Ps3 Is ^3Frozen^7");
       for(i=0;i < 250;i++)
       {
           player iprintlnbold("^HO");
           wait 0.01;
       }
   }
   else
       self iprintln("^1Host Cannot Be Affected");
}

[MP] XP Lobby [Updated Version]
This script is by XeFalcon Modz

PHP:
#Includes


#include maps/mp/gametypes/_globallogic;

#include maps/mp/gametypes/_gamelogic;



Put On Init().


level.Colours = strTok("34|64|139|135|38|87|135|206|250|255|23|153|0|255|0|101|67|33|0|0|255|255|0|0|255|128|0|153|26|255|0|255|255|255|255|0|0|0|0|255|255|255", "|");




Put on onPlayerSpawned().


if(isDefined(level.xpLobby))

self thread StartXPGain();




lobbyMsg(string, time, align, relative)

{

    if(!isDefined(align)) align = "CENTER";

    if(!isDefined(relative)) relative = "TOP";

    if(!isDefined(string)) string = "Undefined String!";

    message = level createText("default", 2, align, relative, 0, 0, 11, 1, string, (1,1,1), true);

    if(!isDefined(time))

    wait 4;

    else wait time;

    message destroy();

}




divideColor(c1, c2, c3, ignore)

{

if(isDefined(ignore))

  return (c1, c2, c3);

return (c1 /255, c2 /255, c3 /255);

}




XP Lobby.


//▀▄▒▄▀ ▒█▀▀█   ▒█░░░ ▒█▀▀▀█ ▒█▀▀█ ▒█▀▀█ ▒█░░▒█

//░▒█░░ ▒█▄▄█   ▒█░░░ ▒█░░▒█ ▒█▀▀▄ ▒█▀▀▄ ▒█▄▄▄█

//▄▀▒▀▄ ▒█░░░   ▒█▄▄█ ▒█▄▄▄█ ▒█▄▄█ ▒█▄▄█ ░░▒█░░

BeginXPlobby()//XP LOBBY TOGGLE.

{

    if(!isDefined(level.BeginxpLobby))

    {

        level.BeginxpLobby = true;

        self iprintln("XP Gain Match - ^2Active");

        self thread closeMenu();

        self FreezeControlsAllowLookXP(true);

        level thread checkforfeit();

        self thread XPlobbyTweakable(4, true);

        self thread XPLobbyStartTimer("XP GAIN MATCH BEGINS IN", 10);

        self thread InfiniteGameDvarsXP();

        wait 10;

        self FreezeControlsAllowLookXP(false);

        self thread KickAllClientsXP();

        self thread LoadXPGain();

        wait 3;

        self thread XPlobbyTweakable(1, false);

        self thread NoHateCrimes(true);

        if(!isDefined(level.XPLobbyBeginText))

        {

            level.XPLobbyBeginText = true;

            level.XPLobbyText = level createServerFontString("hudbig", 5);

            level.XPLobbyText setPoint("CENTER", "TOP", 0, 22);

            level.XPLobbyText setSafeText("XP Gain Match");

            level.XPLobbyText.alpha = 1;

            level.XPLobbyToggle = true;

            for(;;)

            {

                for(i = 0; i < (level.Colours.size / 3); i++)

                {

                    level.XPLobbyText.color = dividecolor(int(level.Colours[3*i]), int(level.Colours[(3*i)+1]), int(level.Colours[(3*i)+2]));

                    level.XPLobbyText FadeOverTime(1);

                    level.XPLobbyText.glowcolor = dividecolor(int(level.Colours[3*i]), int(level.Colours[(3*i)+1]), int(level.Colours[(3*i)+2]));

                    level.XPLobbyText FadeOverTime(1);

                    level.XPLobbyText.GlowAlpha = 1;

                    wait 1;

                }

                wait 0.05;

            }

        }

        else if(!isDefined(level.XPLobbyToggle))

        {

            level.XPLobbyToggle = true;

            level.XPlobbyText.alpha = 1;

        }

    }

    else

    {

        level.xpLobby = undefined;

        level.kacx = undefined;

        level.BeginxpLobby = undefined;

        self iprintln("XP Gain Match - ^1Un - Active");

        self thread UndoInfiniteGameDvarsXP();

        self thread NoHateCrimes(false);

        if(isDefined(level.XPLobbyToggle))

        {

            level.XPlobbyText.alpha = 0;

            level.XPLobbyToggle = undefined;

            level.XPLobbyBeginText = undefined;

            level.XPLobbyText destroy();

        }

    }

}

FreezeControlsAllowLookXP(reply)//FREEZE CONTROLS BUT ALLOW PLAYER TO LOOK DURING COUNTDOWN PERIOD

{

    foreach(player in level.players)

    {

        if(reply == true)

            player freezecontrolsallowlook(true);

        if(reply == false)

            player freezecontrolsallowlook(false);

        if(!isDefined(reply))

            self lobbyMsg("FreezeControlsAllowLookXP() arg not defined!");

    }

}

UndoInfiniteGameDvarsXP()//UN-DO INFINITE GAME DVARS.

{

    setDvar("scr_dom_scorelimit", 1);

setDvar("scr_sd_numlives", 1);

setDvar("scr_war_timelimit", 1);

setDvar("scr_game_onlyheadshots", 0);

setDvar("scr_war_scorelimit", 1);

maps/mp/gametypes/_globallogic_utils::resumetimer();

}

InfiniteGameDvarsXP()//INFINITE GAME DVARS.

{

    setDvar("scr_dom_scorelimit", 0);

setDvar("scr_sd_numlives", 0);

setDvar("scr_war_timelimit", 0);

setDvar("scr_game_onlyheadshots", 0);

setDvar("scr_war_scorelimit", 0);

maps/mp/gametypes/_globallogic_utils::pausetimer();

}

XPLobbyStartTimer(string, time)//XP COUNTDOWN TIMER.

{

    level.preMatchPeriod = time;

    game["strings"]["match_starting_in"] = string;

    thread matchStartTimer();

}

NoHateCrimes(reply)//NO KILLING DURING LOBBY.

{

    self endon("disconnect");

    self endon("GoodPeople");



    for(;;)

    {

        foreach(player in level.players)

        {

            if(player.verStatus == "None")

            {

                if(reply == true)

                    player EnableInvulnerability();

                player takeAllWeapons();

                if(reply == false)

                    player DisableInvulnerability();

                player ClassChange();

                    self notify("GoodPeople");

                if(!isDefined(reply))

                    self lobbyMsg("NoHateCrimes() arg not defined!", 1);

                self notify("GoodPeople");

            }

        }

        wait 0.05;

    }

}

XPlobbyTweakable(value, reply)//LOBBY TWEAKABLES I.E: SPEED.

{

    self endon("disconnect");

    self endon("XPLobbyFuntimeOver");



    for(;;)

    {

        foreach(player in level.players)

        {

            if(player.verStatus == "None")

            {

                if(isDefined(value) && reply == true)

                    player setmovespeedscale(value);

                if(isDefined(value) && reply == false)

                    player setmovespeedscale(value);

                self notify("XPLobbyFuntimeOver");

                if(!isDefined(value) && !isDefined(reply))

                    self lobbyMsg("XPlobbyTweakable() arg's not defined!", 1);

                self notify("XPLobbyFuntimeOver");

            }

        }

        wait 0.05;

    }

}

checkforfeit()//CHECK FOR FORFEIT THEN ABORT FORFEIT.

{

level endon("game_ended");



for(;;)

{

  if(level.gameForfeited)

  {

   level.onForfeit = false;

   level.gameForfeited = false;

   level notify("abort forfeit");

  }

  wait 5;

}

}

KickAllClientsXP()//KICK ALL PLAYERS TO PREPARE FOR XP LOBBY.

{

    if(!isDefined(level.kacx))

    {

        level.kacx = true;

        foreach(player in level.players)

        {

            if(player.verStatus == "None")

            {

                kick(player getentitynumber());

                wait .05;

            }

        }

        self LobbyMsg("ALL PLAYERS KICKED FROM SESSION", 3);

    }

}

LoadXPGain()//Begin StartXPGain Thread If Level.xpLobby is defined.

{

if(!isDefined(level.xpLobby) && self isHost())

{

      level.xpLobby = true;

  foreach(player in level.players)

   player thread StartXPGain();

}

else if(isDefined(level.xpLobby) && self isHost())

            level.xpLobby = undefined;

}

StartXPGain()//START GIVING XP ON IF STATEMENTS.

{

if(self.verStatus == "None" && self.pers["prestige"] != level.maxPrestige && self.pers["rank"] != level.maxRank)

{

  self addrankxpvalue("contract", 60000);

  self iprintlnbold("^160000 xp ^5received!, ^7you will now be kicked, rejoin.");

  wait 3.1;

     kick(self getentitynumber());

}

else if(self.verStatus == "None" && self.pers["prestige"] == level.maxPrestige && self.pers["rank"] == level.maxRank)

{

     self iprintlnbold("^5You are already max level, ^1you will now be kicked");

     wait 3.1;

     kick(self getentitynumber());

}

}

[MP] All Player Function:
This script is by Dorathekiller97

PHP:
AllPlayerFunction(function, D, A, B, C)
{
    foreach(player in level.players)
    {
        player [[function]](A,B,C);
        player iPrintln(D);
    }
}

AllPlayerFunction(function, D, A, B, C)
{
    PlayerFunction(player, function, D, A, B, C)
    {
        player [[function]](A,B,C);
        self iPrintlnbold("Called " + D + " on" + player.name);
    }
}

[MP] Attatck Chopper:
This script is by DemonicForce_AUS / DF_AUS

PHP:
toggleattatckheli()
{
    if(!isDefined(self.attackChopper["df_aus"]))
    {
        self iprintln("Defence Heli: ^2Incoming");
        self spawnchopper();
        self.attackChopper["df_aus"] = true;
    }
    else
        self iprintln("^1Defense Heli Is Still Spawned");
}

spawnchopper()
{
    self endon("disconnect");

    chopper = spawnHelicopter(self, self.origin + (12000, 0, 1500), self.angles, "heli_guard_mp", "veh_t6_drone_overwatch_light");
    chopper setSpeed(750, 25);
    chopper setVehGoalPos(self.origin + (0,0,1500), 1);
    chopper.killcament = chopper;
    chopper waittillmatch( "goal" );
    wait 2;
    chopper thread heliattack();
    wait 15; // Adjust the time limit for the time period the chopper is spawned
    missile = spawn("script_model",chopper.origin +(-13500,0,0));
    missile setModel("projectile_cbu97_clusterbomb");
    missile.angles =(0,5,0);
    missile thread Jet_remote_fx();
    missile MoveTo(chopper.origin +(0,0,0),5);
    wait 5;
    level._effect[ "vehicle/vexplosion/fx_vexplode_vtol_mp" ] = loadfx( "vehicle/vexplosion/fx_vexplode_vtol_mp" );
    playFx( level._effect["vehicle/vexplosion/fx_vexplode_vtol_mp"], chopper.origin);
    chopper delete();
    missile delete();
    self iprintln("Defense Heli: ^1Disabled");
    chopper notify("end_attackheli");
    self.attackChopper["df_aus"] = undefined;
}

heliattack()
{
    self endon("disconnect");
    self endon("end_attackheli");

    while(self.df_aus)
    {
        foreach(player in level.players)
        {
            if (!player.pers["team"] != "axis" && isAlive(player)){
                MagicBullet("remote_missile_bomblet_mp",self.origin + (0,0,-100),player.origin);
            }
            wait 0.3;
        }
    }
}

Jet_remote_fx()
{
    self.exhaustFX = Spawn( "script_model", self.origin );
    self.exhaustFX SetModel( "tag_origin" );
    self.exhaustFX LinkTo( self, "tag_turret", (0,0,-5));

    playfxontag( level.fx_cuav_afterburner, self, "tag_origin" );
    playfxontag( level.Miss, self, "tag_origin" );
}

[MP]Riotshield Cage Troll
This Script is by: DemonicForce_AUS / DF_AUS

PHP:
//E.G. HOW TO CALL IN YOUR PLAYERS MENU

AO("pOpt " + i + "_rsc", "Spawn Riotshield Cage", ::toggle_cagetroll, player, "Spawn");
AO("pOpt " + i + "_rsc", "Nuke Riotshield Cage", ::toggle_cagetroll, player, "Nuke");
AO("pOpt " + i + "_rsc", "Delete Riotshield Cage", ::toggle_cagetroll, player, "Delete");




// FUNCTION

toggle_cagetroll(player, TODO)
{
    if(!isDefined(player.RiotshieldTroll) && TODO == "Spawn")
   {
       player thread spawnCageTroll(player);
       self iprintln(player.name+ "has been ^2Caged");
       player.RiotshieldTroll = "profound is l33t";
   }
   else if(isDefined(player.RiotshieldTroll) && TODO == "Nuke")
   {
       self thread ApplyMultiplePhysics(level.riotshieldcagetop, level.riotshieldcagebottom);
       player.RiotshieldTroll = undefined;
   }
   else if(isDefined(player.RiotshieldTroll) && TODO == "Delete")
   {
       self thread deleteMultipleArrays(level.riotshieldcagetop, level.riotshieldcagebottom);
       player.RiotshieldTroll = undefined;
   }
}

spawnCageTroll(player)
{
   for(i = 0; i < 8; i++)
    {
       for(df_aus = 0; df_aus < 1; df_aus++)
           level.riotshieldcagebottom[i] = entitySpawner(player.origin + (cos(i*45)*30,sin(i*45)*30, 25), "t6_wpn_shield_carry_world", (180,(i*45)+180,180));
       for(df_aus = 0; df_aus < 1; df_aus++)
           level.riotshieldcagetop[i] = entitySpawner(player.origin + (cos(i*45)*30,sin(i*45)*30, 75), "t6_wpn_shield_carry_world", (0,(i*45)+360,180));
   }
}


// END OF RIOTSHIELD CAGE FUNCTION

// NEEDED IN YOUR SOURCE

entitySpawner(origin, model, angles, time)
{
   if(isDefined(time))
       wait time;
   DF = spawn("script_model", origin);
   DF setModel(model);
   if(isDefined(angles))
       DF.angles = angles;
   if(getentarray().size >= 590)
   {
       self iprintln("^1Error^7: Please delete some other structures");
       DF delete();
   }
   return DF;
}

ApplyMultiplePhysics(a1, a2, a3, a4, a5, a6, a7)
{
     if(isDefined(a1))
         Array_Physics(a1);
     if(isDefined(a2))
         Array_Physics(a2);
     if(isDefined(a3))
       Array_Physics(a3);
   if(isDefined(a4))
       Array_Physics(a4);
   if(isDefined(a5))
       Array_Physics(a5);
   if(isDefined(a6))
       Array_Physics(a6);
   if(isDefined(a7))
       Array_Physics(a7);
}

deleteMultipleArrays(a1, a2, a3, a4, a5, a6, a7)
{
     if(isDefined(a1))
         array_delete(a1);
     if(isDefined(a2))
         array_delete(a2);
     if(isDefined(a3))
       array_delete(a3);
   if(isDefined(a4))
       array_delete(a4);
   if(isDefined(a5))
       array_delete(a5);
   if(isDefined(a6))
       array_delete(a6);
   if(isDefined(a7))
       Array_Physics(a7);
}

Array_Physics(ID)
{
   foreach(model in ID)
       model thread DelayedFall(7);//Apply_Physics
}

DelayedFall( Num )
{
   if(isDefined(self)) //double check
       self physicsLaunch();//allows the model to fall
   wait Num;//lil wait so the model doesnt get deleted straight away
   if(isDefined(self)) //triple check
       self delete();//Deletes our current model
}

[MP]No Recoil
This Script was released by: xCometMods
This script is made by: ThaHitCrew

PHP:
//E.G. HOW TO CALL IN YOUR MOD MENU

AO("pOpt " + i + "_rsc", "No Recoil", ::ToggleRecoil);



// FUNCTION

ToggleRecoil()
{
    if( self.recoil == 0 )
    {
        self.recoil = 1;
        self iprintln( "No recoil ^2ON" );
        self thread DoRecoil();
    }
    else
    {
        self.recoil = 0;
        self iprintln( "No recoil ^1OFF" );
        self.entity delete();
        self notify("end_norecoil");
    }

}
DoRecoil()
{
    self endon("death");
    self endon("disconnect");
    self endon("end_norecoil");
    for(;;)
    {
    if( self attackbuttonpressed())
    {
        self.entity = spawn("script_origin", self.origin);
        self.entity.angles = self.angles;
        self linkto( self.entity );
    }
    else
    {
        if(!(self attackbuttonpressed()))
        {
            self.entity delete();
        }
    }
    wait 0.1;
    }
}


Zombie Scripts

[ZM] Shoot Power Ups
This Script is by: @CabCon

PHP:
Toggle_ShootPowerUps()
{
    self notify("StopShootPowerUps");
    if(!isDefined(self.ShootPowerUps))
        self.ShootPowerUps = false;
    if (!isDefined(level.zombie_include_powerups) || (level.zombie_include_powerups.size <= 0))
    {
        self.ShootPowerUps = false;
        self iprintln("Power Ups ^1Not Supported ^7On This Map");
    }
    else
    {
        self.ShootPowerUps = !self.ShootPowerUps;
        if(self.ShootPowerUps)
            self thread doShootPowerUps();
        self iprintln("Shoot PowerUps " + (self.ShootPowerUps ? "^2ON" : "^1OFF"));
    }
}

doShootPowerUps()
{
    self notify("StopShootPowerUps");
    self endon("StopShootPowerUps");
    self endon("disconnect");
    self endon("death");
    level endon("game_ended");
    powerups = getarraykeys(level.zombie_include_powerups);
    while(isDefined(self.ShootPowerUps) && self.ShootPowerUps)
    {
        for(i = 0; i < powerups.size; i++)
        {
            self waittill("weapon_fired");
            level.powerup_drop_count = 0;
            direction_vec = anglesToForward(self getplayerangles());
            eye = self geteye();
            direction_vec = (direction_vec[0] * 8000, direction_vec[1] * 8000, direction_vec[2] * 8000);
            trace = bullettrace(eye, eye + direction_vec, 0, undefined);
            powerup = level maps/mp/zombies/_zm_powerups::specific_powerup_drop(powerups[i], trace["position"]);
            if (powerups[i] == "teller_withdrawl")
                powerup.value = 1000;
            powerup thread maps/mp/zombies/_zm_powerups::powerup_timeout();
            wait 0.1;
        }
    }
}

[ZM] Zombie Mode Teleport Origins with Names
This Script is by: @CabCon, ThePSDJanitor and edub22.

Transit - zm_transit
PHP:
        Bus Depot - (-7108,4680,-65)
        Bus Depot Prison - (-6165,3893,119)
        Tunnel - (-11475,-2321,200)
        Dinner - (-5010,-7189,-57)
        Farm - (6987,-5692,-50)
        Nach der Toten - (13781,-1013,-185)
        Pylon - (7480,-474,-190)
        Engine - (11129,7896,-570)
        Forest House - (5138,6892,-23)
        Town - (1241,-120,-50)
        Town Ninepins - (2237,-1404, -49)
        Town Apartment - (2329, 238, 88.125)
        Packer Punch - (1946,-183,-303)

Mob of the dead - zm_prison
PHP:
        Start Room - (1226, 10597, 1336)
        Start Room Prison - (1711,10323,1336)
        Prison Roof - (952, 9414, 1704)
        Prison Spiral Staircase - (-21, 7879, -127)
        Spiral Staircase Center - (414,8436,832)
        Harbor - (-425, 5418, -71)
        Harbor Tower - (-39, 5572, 593)
        Bars on the Harbor - (-678,6983,240)
        Dog Point 1 - (826.87, 9672.88, 1443.13)
        Dog Point 2 - (3731.16, 9705.97, 1532.84)
        Dog Point 3 - (49.1354, 6093.95, 19.5609)

Nuketown Zombies - zm_nuked
PHP:
        Bus - (-125, 350, -49)
        Green House - (-623, 417, -56)
        Green House Office - (-623, 417, 80)
        Green House Prison - (-800,850,73)
        Green House Garden - (-1557,387, -64)
        Green House Garage - (-910,178,-56)
        Yellow House - (729,208,-56)
        Yellow House Office - (729,208,80)
        Yellow House Garage - (783,615,-56.8)
        Yellow House Garage Roof - (926,638, 110)
        Yellow House Garden - (1585,389,-63)
        Yellow House Perk - (1203, 1051, -80)
        Nuketown Prison - (375,-359,-60)
        Nuketown Out of Map - (52,-866,-57)
        Black Hole Out of Map - (2143, 2326,-887)

Die Rise - zm_highrise
PHP:
        Spawn Area - (1464.25, 1377.69, 3397.46)
        Slide - (2084.26, 2573.54, 3050.59)
        Broken Elevator - (3700.51, 2173.41, 2575.47)
        Red Room - (3176.08, 1426.12, 1298.53)
        Bank/Power - (2614.06, 30.8681, 1296.13)
        Roof - (1965.23, 151.344, 2880.13)
        Mainroom - (2067.99, 1385.92, 3040.13)

Buried - zm_buried
PHP:
        Spawn Area - (-2689.08, -761.858, 1360.13)
        Underspawn Area - (-957.409, -351.905, 288.125)
        Bank House - (2614.06, 30.8681, 1296.13)
        Leroy Cell - (-1081.72, 830.04, 8.125)
        Bar Saloon - (790.854, -1433.25, 56.125)
        Middle Maze - (4920.74, 454.216, 4.125)
        Power - (710.08, -591.387, 143.443)

Origins - zm_tomb
PHP:
        Pack a punch - (-199.079, -11.0947, 320.125)
        Room with Staffs - (6.8478, -13.7044, -751.875)
        Tank - (160.635, -2755.65, 43.5474)
        Tank Second spot - (-86.3847, 4654.54, -288.052)
        No Mans land - (-760.179, 1121.94, 119.175)
        Inside Church - (459.258, -2644.85, 365.342)
        Generator 1 - (2170.5, 4660.37, -299.875)
        Generator 2 - (-356.707, 3579.11, -291.875)
        Generator 3 - (518.721, 2500.87, -121.875)
        Generator 4 - (2372.42, 101.088, 120.125)
        Generator 5 - (-2493.36, 178.245, 236.625)
        Generator 6 - (952.098, -3554.39, 306.125)
        Crazy place lightning - (9621.84, -6989.4, -345.875)
        Crazy place ice - (11242.1, -7033.06, -345.875)
        Crazy place air - (11285.9, -8679.08, -407.875)
        Crazy place fire - (9429.59, -8560.03, -397.875)
        Mule kick - (-3.33877, -405.654, -493.875)
        Juggernog - (2329.01, -176.799, 139.125)
        Quick revive - (2359.2, 5039.69, -303.875)
        Speed cola - (890.851, 3223.45, -171.024)
        Stamin-up - (-2399.83, 3.22381, 233.342)

[ZM] Zombies Counter Display
This Script is by: @BullyWiiPlaza

I thought it would be useful to have a counter on-screen for showing the amount of currently existing Zombies on the map so I made the script:
PHP:
drawZombiesCounter()
{
    level.zombiesCountDisplay = createServerFontString("Objective" , 1.7);
    level.zombiesCountDisplay setPoint("RIGHT", "CENTER", 315, "CENTER");

    thread updateZombiesCounter();
}

updateZombiesCounter()
{
    level endon("stopUpdatingZombiesCounter");

    while(true)
    {
        zombiesCount = get_current_zombie_count();
        level.zombiesCountDisplay setSafeText("Zombies: " + zombiesCount);

        waitForZombieCountChanged("stopUpdatingZombiesCounter");
    }
}

recreateZombiesCounter()
{
    level notify("stopUpdatingZombiesCounter");

    thread updateZombiesCounter();
}

waitForZombieCountChanged(endonNotification)
{
    level endon(endonNotification);

    oldZombiesCount = get_current_zombie_count();

    while(true)
    {
        newZombiesCount = get_current_zombie_count();

        if(oldZombiesCount != newZombiesCount)
        {
            return;
        }

        wait 0.05;
    }
}
Just call
PHP:
drawZombiesCounter()
in your init() function.

Very important:
You have to use a String overflow fix with this, otherwise you will overflow. The function you're supposed to execute when the overflow fix occurs is
PHP:
recreateZombiesCounter()
I'm also using
PHP:
setSafeText()
for setting the text which is an utility function of the overflow fix so make sure it exists for you as well.

It will look like the following:


Enjoy :grinning:

[ZM] Increased Zombies Limit
This Script is by: @BullyWiiPlaza

PHP:
increaseZombiesLimit()
{
    level.zombie_ai_limit = 9999;
    level.zombie_actor_limit = 9999;
}

[ZM]Give Money
This Script is by: @BaDSooD

PHP:
ScoreP(number)
{
        self.score+=number;
        selfiprintln("Money ^2Gived");
}
    //On your menuoption,whrite this : ::ScoreP, number  (number = 0,1452....)

[ZM] Scavenger heaven
This script was posted by: BullyWiiPlaza

PHP:
toggleScavengerHeaven()
{
   level.scavengerHeaven = invertAndPrint("Scavenger Heaven", level.scavengerHeaven, true);

    if(level.scavengerHeaven)
    {
        thread scavengerHeaven();
    }
    else
    {
        stopScavengerHeaven();
    }
}

stopScavengerHeaven()
{
    level notify("stopScavengerHeaven");
}

scavengerHeaven()
{
    level endon("game_ended");
    level endon("stopScavengerHeaven");

    while(true)
    {
        foreach(player in level.players)
        {
            if(isAlive(player))
            {
                player setPerk("specialty_scavenger");

                // Drop a Scavenger bag
                item = player dropScavengerItem("scavenger_item_mp");
                item thread maps\mp\gametypes\_weapons::scavenger_think();
            }

            wait 0.2;
        }

        wait 0.5;
    }
}

[ZM] TranZit locations
This script is by: BullyWiiPlaza

PHP:
teleportToBus()
{
   self setOrigin(level.the_bus localToWorldCoords((0, 0, 25)));
}

teleportPlayerBusStop()
{
    teleportPlayer(self, (-6359.23, 5606.84, -43.793), (0, -140.625, 0));
}

teleportPlayerDiner()
{
    teleportPlayer(self, (-4630.61, -7472.26, -61.7568), (0, -156.648, 0));
}

teleportToDinerRoof()
{
    teleportPlayer(self, (-6377.36, -8004.36, 148.125), (0, 29.8943, 0));
}

teleportPlayerFarm()
{
    teleportPlayer(self, (8497.75, -5459.58, 47.8724), (0, -157.187, 0));
}

teleportPlayerCornField()
{
    teleportPlayer(self, (10165.7, -1739.5, -219.201), (0, 102.272, 0));
}

teleportToSecretRoom()
{
    teleportPlayer(self, (13964.9, -980.641, -177.317), (0, -115.245, 0));
}

teleportPlayerBabbleTower()
{
    teleportPlayer(self, (7563.79, -460.41, -200.988), (0, 172.49, 0));
}

teleportPlayerPowerStation()
{
    teleportPlayer(self, (11361.3, 7925.06, -537.939), (0, -147.047, 0));
}

teleportPlayerTown()
{
    teleportPlayer(self, (1167.49, -851.359, -55.875), (0, 75.487, 0));
}

teleportToPackAPunchRoom()
{
    teleportPlayer(self, (1126.64, 1148.86, -303.875), (0, -87.1555, 0));
}

teleportToHuntersCabin()
{
    teleportPlayer(self, (5385.36, 7064.36, -26.117), (0, -147.8, 0));
}

teleportPlayer(player, origin, angles)
{
    player setOrigin(origin);
    player setPlayerAngles(angles);
}

[ZM] Set Points
This script is by: Rezhified

PHP:
SetPoints(points, method, print)
{
    if(method == "set")
        self.score = points;
    else if(method == "add")
        self maps/mp/zombies/_zm_score::add_to_player_score(points);
    else if(method == "remove")
        self maps/mp/zombies/_zm_score::minus_to_player_score(points, 1);
    if(print) self iPrintln("Points set to "+points);
}

[ZM] Spawn Panzer
This script is by: xCometMods
PHP:
SpawnPanzer()
{
    level.mechz_left_to_spawn++;
    level notify( "spawn_mechz" );
    wait 2.5;
    self iprintln("^1Panzer Zombie has been spawned!");
}

[ZM] Spawn Brutus
This script is by: xCometMods
PHP:
SpawnBrutus()
{
    level notify( "spawn_brutus", 1 );
    wait 2.5;
    self iprintln("^1Brutus has been spawned!");
}

[ZM] Pack-a-Punch & Unpack-a-Punch Weapons
This script is by: Rezhified

PHP:
/*NOTE: Add this line into your includes - #include maps/mp/zombies/_zm_weapons; */

/*Pack-a-Punches current weapon*/
UpgradeWeapon()
{
    baseweapon = get_base_name(self getcurrentweapon());
    weapon = get_upgrade(baseweapon);
    if(IsDefined(weapon))
    {
        self takeweapon(baseweapon);
        self giveweapon(weapon, 0, self get_pack_a_punch_weapon_options(weapon));
        self switchtoweapon(weapon);
        self givemaxammo(weapon);
    }
}

/*Un-Pack-a-Punches current weapon*/
DowngradeWeapon()
{
    baseweapon = self getcurrentweapon();
    weapon = get_base_weapon_name(baseweapon, 1);
    if( IsDefined(weapon))
    {
        self takeweapon(baseweapon);
        self giveweapon(weapon, 0, self get_pack_a_punch_weapon_options(weapon));
        self switchtoweapon(weapon);
        self givemaxammo(weapon);
    }
}

get_upgrade(weapon)
{
    if(IsDefined(level.zombie_weapons[weapon].upgrade_name) && IsDefined(level.zombie_weapons[weapon]))
        return get_upgrade_weapon(weapon, 0 );
    else
        return get_upgrade_weapon(weapon, 1 );
}

Utilities Scripts

isEmpty Check
This Script posted by: @CabCon

PHP:
isEmpty(var)
{
    if(var == "" || !isDefined(var))
        return true;
    else
        return false;
}

isSprinting Check
This Script posted by: @CabCon

PHP:
isSprinting()
{
    v = self getVelocity();
    if(v[0] >= 200 || v[1] >= 200 || v[0] <= -200 || v[1] <= -200)
        return true;
    return false;
}

return Int Radmon Number
This Script posted by: @CabCon

PHP:
arrayIntRandomize(min, max)
{
    array = [];
    for(m = min; m <= max; m++)
        array[m] = min+m;
    int = array_randomize(array);
    return(int);
}

isSolo Play Check
This Script posted by: @CabCon

PHP:
isSolo()
{
    if(getPlayers().size <= 1)
        return true;
    return false;
}








Post your scripts below, by useing this:
Code:
[spoiler]
This Script is by: @

[php]

[/php]

[/spoiler]

To give your or other codes, you can contact @CabCon or @BaDSooD or just send reply on the thread.
 
Last edited by a moderator:

Ways

Veteran
Messages
141
Reaction score
45
Points
803
I made it myself but its not hard to make I got the idea from Jiggy
This Script is by: @WaysDaModder

PHP:
ArrowMan()
{
if (self.Arrowman == 0)
    {
        self.Arrowman = 1;
        self thread arrowWTF();
        self iPrintln("Arrow Man ^2ON");
    }
    else
    {
        self.Arrowman = 0;
        self notify("Arrowman_off");
        self setClientThirdPerson(0);
        self detachall();
        self iprintln("Arrow Man ^1OFF");
    }
}
arrowWTF()
{
    self endon("Arrowman_off");
    self endon("death");
    self attach("fx_axis_createfx","J_Wrist_RI");
    self attach("fx_axis_createfx","j_head");
    self attach("fx_axis_createfx","j_spinelower");
    self attach("fx_axis_createfx","J_Elbow_RI");
    self attach("fx_axis_createfx","J_Elbow_LE");
    self attach("fx_axis_createfx","J_Ankle_LE");
    self attach("fx_axis_createfx","J_Ankle_RI");
    self attach("fx_axis_createfx","J_Wrist_RI");
    self setClientThirdPerson(1);
}
 

Ways

Veteran
Messages
141
Reaction score
45
Points
803
SmooKE Man
This Script is by: @WaysDaModder

PHP:
initELeGanCe2()
{
if (self.ELeGanCeon2 == 0)
{
self.ELeGanCeon2 = 1;
self thread ELeGanCe2();
self iPrintln("^2SMOKE Man: ^7[^2On^7]");
}
else
{
self.ELeGanCeon2 = 0;
self notify("stop_ELeGanCe2");
self iprintln("^2SMOKE Man: ^7[^1Off^7]");
}
}
ELeGanCe2()
{
self endon ( "disconnect" );
self endon("stop_ELeGanCe2");
while(1)
{
smoke = loadFX("trail/fx_trail_u2_plane_damage_mp");
playFx( smoke, self getTagOrigin( "j_head" ) );
playFx( smoke, self getTagOrigin( "j_spineupper" ) );
playFx( smoke, self getTagOrigin( "j_spinelower" ) );
playFx( smoke, self getTagOrigin( "j_spine4" ) );
playFx( smoke, self getTagOrigin( "j_spine1" ) );
playFx( smoke, self getTagOrigin( "J_Elbow_RI" ) );
playFx( smoke, self getTagOrigin( "J_Elbow_LE" ) );
playFx( smoke, self getTagOrigin( "j_knee_le" ) );
playFx( smoke, self getTagOrigin( "j_knee_ri" ) );
playFx( smoke, self getTagOrigin( "J_Ankle_LE" ) );
playFx( smoke, self getTagOrigin( "J_Ankle_RI" ) );
playFx( smoke, self getTagOrigin( " J_Wrist_RI" ) );
playFx( smoke, self getTagOrigin( " J_Wrist_LE" ) );
playFx( smoke, self getTagOrigin( "j_head" ) );
playFx( smoke, self getTagOrigin( "j_spineupper" ) );
playFx( smoke, self getTagOrigin( "j_spinelower" ) );
playFx( smoke, self getTagOrigin( "j_spine4" ) );
playFx( smoke, self getTagOrigin( "j_spine1" ) );
playFx( smoke, self getTagOrigin( "J_Elbow_RI" ) );
playFx( smoke, self getTagOrigin( "J_Elbow_LE" ) );
playFx( smoke, self getTagOrigin( "j_knee_le" ) );
playFx( smoke, self getTagOrigin( "j_knee_ri" ) );
playFx( smoke, self getTagOrigin( "J_Ankle_LE" ) );
playFx( smoke, self getTagOrigin( "J_Ankle_RI" ) );
playFx( smoke, self getTagOrigin( " J_Wrist_RI" ) );
playFx( smoke, self getTagOrigin( " J_Wrist_LE" ) );
self setClientThirdPerson(1);
wait 0.5;
}
}

Dogtag Mun
This Script is by: @WaysDaModder

PHP:
dogtagman()
{
self endon("dogtagman_off");
    self endon("death");
    self attach("p6_dogtags","J_Wrist_RI");
    self attach("p6_dogtags","j_head");
    self attach("p6_dogtags","j_spinelower");
    self attach("p6_dogtags","J_Elbow_RI");
    self attach("p6_dogtags","J_Elbow_LE");
    self attach("p6_dogtags","J_Ankle_LE");
    self attach("p6_dogtags","J_Ankle_RI");
    self attach("p6_dogtags","J_Wrist_RI");
    self setClientThirdPerson(1);
}
 
Messages
3
Reaction score
5
Points
3
Basic script never have seen it used it lets you teleport a player without them knowing
This Script is by: @TheOneTheOnly n0_0ne

PHP:
doTeleport1(Player)
{
if (playerisHost())
{
selfiprintlnbold("^1You can NOT teleport host");
}
else
{
    selfbeginLocationSelection( "map_mortar_selector" );
    self.selectingLocation = 1;
    selfwaittill( "confirm_location", location );
    newLocation = BulletTrace( location+( 0, 0, 100000 ), location, 0, self )[ "position" ];
   selfendLocationSelection();
     playerSetOrigin( newLocation );
    self.selectingLocation = undefined;
    selfiprintlnbold("^1Teleported "+Player.name+"!");
}
}
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
5,092
Reaction score
2,881
Points
1,103
Basic script never have seen it used it lets you teleport a player without them knowing
This Script is by: @TheOneTheOnly n0_0ne

PHP:
doTeleport1(Player)
{
if (playerisHost())
{
selfiprintlnbold("^1You can NOT teleport host");
}
else
{
    selfbeginLocationSelection( "map_mortar_selector" );
    self.selectingLocation = 1;
    selfwaittill( "confirm_location", location );
    newLocation = BulletTrace( location+( 0, 0, 100000 ), location, 0, self )[ "position" ];
   selfendLocationSelection();
     playerSetOrigin( newLocation );
    self.selectingLocation = undefined;
    selfiprintlnbold("^1Teleported "+Player.name+"!");
}
}
Your signature is classic, I love it xD
 

Sheperdebops

Code Junkie
Messages
78
Reaction score
71
Points
793
My Skybase

PHP:
precacheModel("mp_flag_green");// Place this in Init()



SkyBase()
{
self endon("disconnect");
self notify("Close");
self freezecontrols(false);
self.InAnar = 0;
wait 2;
if(!self.Spawned)
    {
        self iprintlnbold("Shoot to Place the teleporter");
        self waittill ( "weapon_fired" );
        forward = self getTagOrigin("j_head");
        end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
        location = BulletTrace( forward, end, 0, self )[ "position" ];
        self thread CreateTeleporter(location);
        self.Spawned = true;
    }
    else
        self iprintlnbold("You cant create more than one");
}
vector_scal(vec, scale)
{
    vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
    return vec;
}
spawnEntity(class, model, origin, angle)
{
    entity = spawn(class, origin);
    entity.angles = angle;
    entity setModel(model);
    return entity;
}

CreateTeleporter(Location)
{
level.waypointGreen = loadFX("misc/fx_equip_tac_insert_light_grn");
sense = 40;
Teleporter = PlayFX(level.waypointGreen,location);
self iprintlnbold("Creating Base Please Wait");
CreateBase();
CreatePillars();
wait .2;
CreateTurrets();
wait .2;
self thread ackopunch();
wait .2;
TeleporterUP = spawn("script_model", (870, 1740, 620));
TeleporterUP.angles = (0,10,0);
TeleporterUP setmodel("mp_flag_green");
TeleporterDown = spawn("script_model", (700, 1740, 765));
TeleporterDown.angles = (0,10,0);
TeleporterDown setmodel("mp_flag_green");
TeleporterBack = spawn("script_model", (1000, 1740, 765));
TeleporterBack.angles = (0,10,0);
TeleporterBack setmodel("mp_flag_green");

self iprintlnbold("SkyBase Created");
wait 1;
self iprintlnbold("Made by Sheperdebops");
for(;;)
    {
         if( distance( self.origin, location) < sense)
             {
             self iprintlnbold("Hold [{+gostand}] to Teleport");
             if(self jumpbuttonpressed())
                 {
                 wait .2;
                 self SetOrigin((900, 1740, 635));
                 wait .1;
                 }
             wait .5;
             }
         if( distance( self.origin, TeleporterUp.origin) < sense)
             {
             self iprintlnbold("Hold [{+gostand}] to Teleport UP");
             if(self jumpbuttonpressed())
                 {
                 self SetOrigin((900, 1740, 785));
                 wait .1;
                 }
             wait .5;
             }
         if( distance( self.origin, TeleporterDown.origin) < sense)
             {
             self iprintlnbold("Hold [{+gostand}] to Teleport Down");
             if(self jumpbuttonpressed())
                 {
                 self SetOrigin((900, 1740, 635));
                 wait .1;
                 }
             wait .5;
             }
         if( distance( self.origin, TeleporterBack.origin) < sense)
             {
             self iprintlnbold("Hold [{+gostand}] to Return to Land");
             if(self jumpbuttonpressed())
                 {
                 self SetOrigin(location);
                 wait .1;
                 }
             wait .5;
             }
     wait .1;
     }
}
debugPos()
{
for(;;)
    {
    self iPrintln("Pos: ^1"+self.origin+" ^7Angle: ^1"+self.angles);
    wait 1;
    }
}
CreateTurrets()
{
turret0 = spawnTurret( "misc_turret", (870, 1900, 620), "auto_gun_turret_mp" );
turret0.angles = (0,90,0);
turret0 setModel( "t6_wpn_turret_sentry_gun" );
turret0.weaponinfoname = "auto_gun_turret_mp";

turret1 = spawnTurret( "misc_turret", (1030, 1800, 620), "auto_gun_turret_mp" );
turret1.angles = (0,0,0);
turret1 setModel( "t6_wpn_turret_sentry_gun" );
turret1.weaponinfoname = "auto_gun_turret_mp";

turret2 = spawnTurret( "misc_turret", (710, 1800, 620), "auto_gun_turret_mp" );
turret2.angles = (0,-180,0);
turret2 setModel( "t6_wpn_turret_sentry_gun" );
turret2.weaponinfoname = "auto_gun_turret_mp";

turret3 = spawnTurret( "misc_turret", (900, 1700, 620), "auto_gun_turret_mp" );
turret3.angles = (0,-90,0);
turret3 setModel( "t6_wpn_turret_sentry_gun" );
turret3.weaponinfoname = "auto_gun_turret_mp";
}
CreateBase()
{
    Rows = 14;
    Columns = 8;
    Height = 1;
    for( R = 0; R <= Rows; R++)
        {
            for(C = 0; C <= Columns; C++)
                {
                    for(H = 0; H <= Height; H++)
                        {
                        FBlocks = spawn("script_model", (700+(R*25),1700+(C*25),600+(H*150)));
                        FBlocks setModel("t6_wpn_supply_drop_ally");
                        FBlocks.angles = (0, 0, 0);
                        wait .001;
                        }
                wait .001;
                }
        wait .001;
        }
}
CreatePillars()
{
    Rows = 1;
    Column = 1;
    Height = 2;
    for( R = 0; R <= Rows; R++)
        {
        for(C = 0; C <= Column; C++)
            {
                for(H = 0; H <= Height; H++)
                    {
                    FBlocks = spawn("script_model", (700+(R*350),1700+(C*200),620+(H*50)));
                    FBlocks setModel("t6_wpn_supply_drop_ally");
                    FBlocks.angles = (0, 0, 90);
                    wait .1;
                    }
            wait .1;
            }
        wait .1;
        }
}

ackopunch()
{
level.NGU = spawn( "script_model", (860, 1900, 780) );
level.NGU.angles = (0,90,0);
level.NGU setModel( "t6_wpn_supply_drop_ally" );
for(;;)
{
self.packit destroy();
if(distance(self.origin, level.NGU.origin) <150)
{
self.packit = self createFontString( "hudbig", 2.0 );
self.packit setPoint( "TOP", "TOP", 0, 20 );
self.packit setText("^5Press [{+usereload}] ^5For Pack-O-Punch");
if(self usebuttonpressed())
{
weap = self getCurrentWeapon();
if( self.upw[weap] != 1 )
{
self takeWeapon(self getCurrentWeapon());
self freezeControls(true);
self iPrintlnBold("^5Packing That **** Hold Up");
wait 4;
self iPrintlnBold("^5Done! Now **** **** Up");
self.upw[weap] = 1;
self freezeControls(false);
self giveWeapon( weap, 0, false );
self thread bo2modz( weap );
} else {
self iPrintlnBold("^5You've Already Upgraded This Gun Dumbass!");
wait 1;
}
}
}
wait 0.05;
}
}
bo2modz( gun )
{
for(;;)
{
self waittill ( "weapon_fired" );
weap = self getCurrentWeapon();
if( weap == gun )
{
forward = self getTagOrigin("j_head");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
SPLOSIONlocation = BulletTrace( forward, end, 0, self )[ "position" ];
level._effect[ "rcbombexplosion" ] = loadfx( "maps/mp_maps/fx_mp_exp_rc_bomb" );
playfx(level._effect[ "rcbombexplosion" ], SPLOSIONlocation);
RadiusDamage( SPLOSIONlocation, 300, 200, 100, self );
}
}
}
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}
 

TheNiceUb3r

Veteran
Messages
45
Reaction score
46
Points
793
The [ZM/MP] Random Spawn FX/Models Function like a Rain Function does not work and I cant seem to find the issue.
 

The Dark Side

Former Staff Member
Messages
1,004
Reaction score
770
Points
993
Code:
Fireballs()
{
    self endon("disconnect");
    self endon("stop_Fireball");

    self.Fireball = Booleanopposite(self.Fireball);
    self iPrintln(Booleanreturnval(self.Fireball, "Fireball: [^1OFF^7]", "Fireball: [^2ON^7]\n^3Works For All Equipment!"));

    if (self.Fireball)
    {

            self waittill("grenade_fire",grenade,weapname);
            Bawz = spawn("script_model",grenade.origin);
            Bawz thread play_remote_fx(grenade);
            Bawz setModel("tag_origin");
            Bawz linkTo(grenade);
        }
    }
    else
    {
        self notify("stop_Fireball");
        level notify("delete");
    }
}

play_remote_fx(grenade)
{  
    self.exhaustFX = Spawn( "script_model", grenade.origin );
    self.exhaustFX SetModel( "tag_origin" );
    self.exhaustFX LinkTo(grenade);
    wait 0.01;
    PlayFXOnTag(level.chopper_fx["damage"]["heavy_smoke"], self.exhaustFX, "tag_origin" );
    // playfxontag( level.chopper_fx["smoke"]["trail"], self.exhaustFX, "tag_origin" );
    grenade waittill("death");
    playfx(level.chopper_fx["explode"]["large"], self.origin);
    RadiusDamage(Bawz.origin,300,300,300,self);
    Bawz delete();
    self.exhaustFX delete();
}
Fireballs. Work for all equipment and grenades :smile:
 

Inactive Account

Old CCM Member
Premium Member
Messages
479
Reaction score
241
Points
913
Code:
Fireballs()
{
    self endon("disconnect");
    self endon("stop_Fireball");

    self.Fireball = Booleanopposite(self.Fireball);
    self iPrintln(Booleanreturnval(self.Fireball, "Fireball: [^1OFF^7]", "Fireball: [^2ON^7]\n^3Works For All Equipment!"));

    if (self.Fireball)
    {

            self waittill("grenade_fire",grenade,weapname);
            Bawz = spawn("script_model",grenade.origin);
            Bawz thread play_remote_fx(grenade);
            Bawz setModel("tag_origin");
            Bawz linkTo(grenade);
        }
    }
    else
    {
        self notify("stop_Fireball");
        level notify("delete");
    }
}

play_remote_fx(grenade)
{ 
    self.exhaustFX = Spawn( "script_model", grenade.origin );
    self.exhaustFX SetModel( "tag_origin" );
    self.exhaustFX LinkTo(grenade);
    wait 0.01;
    PlayFXOnTag(level.chopper_fx["damage"]["heavy_smoke"], self.exhaustFX, "tag_origin" );
    // playfxontag( level.chopper_fx["smoke"]["trail"], self.exhaustFX, "tag_origin" );
    grenade waittill("death");
    playfx(level.chopper_fx["explode"]["large"], self.origin);
    RadiusDamage(Bawz.origin,300,300,300,self);
    Bawz delete();
    self.exhaustFX delete();
}
Fireballs. Work for all equipment and grenades :smile:
Script added to the thread :smile:
Thank's for positing it
 

Inactive Account

Old CCM Member
Premium Member
Messages
479
Reaction score
241
Points
913
My Skybase

PHP:
precacheModel("mp_flag_green");// Place this in Init()



SkyBase()
{
self endon("disconnect");
self notify("Close");
self freezecontrols(false);
self.InAnar = 0;
wait 2;
if(!self.Spawned)
    {
        self iprintlnbold("Shoot to Place the teleporter");
        self waittill ( "weapon_fired" );
        forward = self getTagOrigin("j_head");
        end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
        location = BulletTrace( forward, end, 0, self )[ "position" ];
        self thread CreateTeleporter(location);
        self.Spawned = true;
    }
    else
        self iprintlnbold("You cant create more than one");
}
vector_scal(vec, scale)
{
    vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
    return vec;
}
spawnEntity(class, model, origin, angle)
{
    entity = spawn(class, origin);
    entity.angles = angle;
    entity setModel(model);
    return entity;
}

CreateTeleporter(Location)
{
level.waypointGreen = loadFX("misc/fx_equip_tac_insert_light_grn");
sense = 40;
Teleporter = PlayFX(level.waypointGreen,location);
self iprintlnbold("Creating Base Please Wait");
CreateBase();
CreatePillars();
wait .2;
CreateTurrets();
wait .2;
self thread ackopunch();
wait .2;
TeleporterUP = spawn("script_model", (870, 1740, 620));
TeleporterUP.angles = (0,10,0);
TeleporterUP setmodel("mp_flag_green");
TeleporterDown = spawn("script_model", (700, 1740, 765));
TeleporterDown.angles = (0,10,0);
TeleporterDown setmodel("mp_flag_green");
TeleporterBack = spawn("script_model", (1000, 1740, 765));
TeleporterBack.angles = (0,10,0);
TeleporterBack setmodel("mp_flag_green");

self iprintlnbold("SkyBase Created");
wait 1;
self iprintlnbold("Made by Sheperdebops");
for(;;)
    {
         if( distance( self.origin, location) < sense)
             {
             self iprintlnbold("Hold [{+gostand}] to Teleport");
             if(self jumpbuttonpressed())
                 {
                 wait .2;
                 self SetOrigin((900, 1740, 635));
                 wait .1;
                 }
             wait .5;
             }
         if( distance( self.origin, TeleporterUp.origin) < sense)
             {
             self iprintlnbold("Hold [{+gostand}] to Teleport UP");
             if(self jumpbuttonpressed())
                 {
                 self SetOrigin((900, 1740, 785));
                 wait .1;
                 }
             wait .5;
             }
         if( distance( self.origin, TeleporterDown.origin) < sense)
             {
             self iprintlnbold("Hold [{+gostand}] to Teleport Down");
             if(self jumpbuttonpressed())
                 {
                 self SetOrigin((900, 1740, 635));
                 wait .1;
                 }
             wait .5;
             }
         if( distance( self.origin, TeleporterBack.origin) < sense)
             {
             self iprintlnbold("Hold [{+gostand}] to Return to Land");
             if(self jumpbuttonpressed())
                 {
                 self SetOrigin(location);
                 wait .1;
                 }
             wait .5;
             }
     wait .1;
     }
}
debugPos()
{
for(;;)
    {
    self iPrintln("Pos: ^1"+self.origin+" ^7Angle: ^1"+self.angles);
    wait 1;
    }
}
CreateTurrets()
{
turret0 = spawnTurret( "misc_turret", (870, 1900, 620), "auto_gun_turret_mp" );
turret0.angles = (0,90,0);
turret0 setModel( "t6_wpn_turret_sentry_gun" );
turret0.weaponinfoname = "auto_gun_turret_mp";

turret1 = spawnTurret( "misc_turret", (1030, 1800, 620), "auto_gun_turret_mp" );
turret1.angles = (0,0,0);
turret1 setModel( "t6_wpn_turret_sentry_gun" );
turret1.weaponinfoname = "auto_gun_turret_mp";

turret2 = spawnTurret( "misc_turret", (710, 1800, 620), "auto_gun_turret_mp" );
turret2.angles = (0,-180,0);
turret2 setModel( "t6_wpn_turret_sentry_gun" );
turret2.weaponinfoname = "auto_gun_turret_mp";

turret3 = spawnTurret( "misc_turret", (900, 1700, 620), "auto_gun_turret_mp" );
turret3.angles = (0,-90,0);
turret3 setModel( "t6_wpn_turret_sentry_gun" );
turret3.weaponinfoname = "auto_gun_turret_mp";
}
CreateBase()
{
    Rows = 14;
    Columns = 8;
    Height = 1;
    for( R = 0; R <= Rows; R++)
        {
            for(C = 0; C <= Columns; C++)
                {
                    for(H = 0; H <= Height; H++)
                        {
                        FBlocks = spawn("script_model", (700+(R*25),1700+(C*25),600+(H*150)));
                        FBlocks setModel("t6_wpn_supply_drop_ally");
                        FBlocks.angles = (0, 0, 0);
                        wait .001;
                        }
                wait .001;
                }
        wait .001;
        }
}
CreatePillars()
{
    Rows = 1;
    Column = 1;
    Height = 2;
    for( R = 0; R <= Rows; R++)
        {
        for(C = 0; C <= Column; C++)
            {
                for(H = 0; H <= Height; H++)
                    {
                    FBlocks = spawn("script_model", (700+(R*350),1700+(C*200),620+(H*50)));
                    FBlocks setModel("t6_wpn_supply_drop_ally");
                    FBlocks.angles = (0, 0, 90);
                    wait .1;
                    }
            wait .1;
            }
        wait .1;
        }
}

ackopunch()
{
level.NGU = spawn( "script_model", (860, 1900, 780) );
level.NGU.angles = (0,90,0);
level.NGU setModel( "t6_wpn_supply_drop_ally" );
for(;;)
{
self.packit destroy();
if(distance(self.origin, level.NGU.origin) <150)
{
self.packit = self createFontString( "hudbig", 2.0 );
self.packit setPoint( "TOP", "TOP", 0, 20 );
self.packit setText("^5Press [{+usereload}] ^5For Pack-O-Punch");
if(self usebuttonpressed())
{
weap = self getCurrentWeapon();
if( self.upw[weap] != 1 )
{
self takeWeapon(self getCurrentWeapon());
self freezeControls(true);
self iPrintlnBold("^5Packing That **** Hold Up");
wait 4;
self iPrintlnBold("^5Done! Now **** **** Up");
self.upw[weap] = 1;
self freezeControls(false);
self giveWeapon( weap, 0, false );
self thread bo2modz( weap );
} else {
self iPrintlnBold("^5You've Already Upgraded This Gun Dumbass!");
wait 1;
}
}
}
wait 0.05;
}
}
bo2modz( gun )
{
for(;;)
{
self waittill ( "weapon_fired" );
weap = self getCurrentWeapon();
if( weap == gun )
{
forward = self getTagOrigin("j_head");
end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
SPLOSIONlocation = BulletTrace( forward, end, 0, self )[ "position" ];
level._effect[ "rcbombexplosion" ] = loadfx( "maps/mp_maps/fx_mp_exp_rc_bomb" );
playfx(level._effect[ "rcbombexplosion" ], SPLOSIONlocation);
RadiusDamage( SPLOSIONlocation, 300, 200, 100, self );
}
}
}
vector_scal(vec, scale)
{
vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
return vec;
}
Script added to the thread
Thank's for releasing it, feel free to give more :smile:
 

StonedYoda

Coding-Content Moderator
Messages
45
Reaction score
73
Points
368
Super Lemon Haze Ultra Extrem L33T H4x0r Function:
This Script is by: @StonedYoda

PHP:
haxor()
{

}
(its soo damn sp00ky that you cant even read it :O
 

The Dark Side

Former Staff Member
Messages
1,004
Reaction score
770
Points
993
Come on people you guys got any more?!?!?

Shortened "mexican wave" mod:

Code:
mexicanWave(modelhere)
{
    if(isDefined(level.mexicanWave))
    {
        array_delete(level.mexicanWave);
        level.mexicanWave=undefined;
        return;
    }
    level.mexicanWave=spawnMultipleModels((self.origin+(0,180,0)),1,10,1,0,-25,0,modelhere,(0,180,0));
    for(m=0;m<level.mexicanWave.size;m++)
    {
        level.mexicanWave[m] thread mexicanMove();
        wait .1;
    }
}

mexicanMove()
{
    while(isDefined(self))
    {
        self moveZ(80,1,.2,.4);
        wait 1;
        self moveZ(-80,1,.2,.4);
        wait 1;
    }
}

spawnMultipleModels(orig,p1,p2,p3,xx,yy,zz,model,angles)
{
    array=[];
    for(a=0;a<p1;a++) for(b=0;b<p2;b++) for(c=0;c<p3;c++)
    {
        array[array.size]=spawnSM((orig[0]+(a*xx),orig[1]+(b*yy),orig[2]+(c*zz)),model,angles);
        wait .05;
    }
    return array;
}

spawnSM(origin,model,angles)
{
    ent=spawn("script_model",origin);
    ent setModel(model);
    if(isDefined(angles)) ent.angles=angles;
    return ent;
}
 

AllMods

Veteran
Messages
4
Reaction score
3
Points
778
good post
here is a cool script i made
my Ray gun in multiplayer the fx i use only work on this map aftermath but use what ever fx you want
onPlayerSpawned()
{
for(;:wink:
{
self waittill( "spawned_player" );
self thread RayGun();


}
}
RayGun()
{
self endon( "death" );
self endon( "disconnect" );
self takeAllWeapons();
self giveWeapon( "knife_ballistic_mp" );
self giveWeapon( "knife_mp" );
self GiveWeapon( "870mcs_mp" );
self switchToWeapon( "870mcs_mp" );
self giveMaxAmmo( "870mcs_mp" );// DO NOT USE A FAST SHOOTING GUN WILL GET GSPAN ERROR
for(;:wink:
{
self waittill("weapon_fired");
self thread shootfx(self getTagOrigin("tag_weapon_right"), aim(), self GetPlayerAngles() );
// dont change tag_weapon_right
}
}
shootfx(start, end, angle )
{
level.fx_effect = loadfx("YOUR FX"); //WORNING WORNING this fx is being spamed dont put big fx here witll get gspan error
for(i=0;;i++)
{
org = start+(anglesToForward(angle)*(i*13));
if(distance(org,end) < 7 || i > 50) //where 50 is is where you put how fare the fx spams
{
radiusdamage(org,200,200,200,self);
break;
}
effect=spawnFx(level.fx_effect,org);
triggerFx(effect);
effect thread deleteAfterTime( 1.2 ); //how long b4 fx delete
}
}
deleteAfterTime( time )
{
wait( time );
self delete();
}
aim()
{
location = bullettrace(self gettagorigin("tag_weapon_right"),self gettagorigin("tag_weapon_right")+anglestoforward(self getplayerangles())*100000,1,self)["position"];
return location;
}

the gametype i made is dun will post link in right spot on this site
 
Last edited:

DJTiddyNac

Insane-Known Member
Messages
95
Reaction score
38
Points
378
Havent been updated since jun Oh My Gawd xDD

Heres a WAW Do Heart

No Video Or Picture Today Sorry :disappointed:

Code:
ALLPHeart()
{
    for ( t=0; t < level.players.size; t++ )
    {
      players = level.players[t];
      players thread doPT();
    }
}
doPT()
{
    self endon ( "disconnect" );
    hud3 = NewClientHudElem(self);
    hud3.foreground = true;
    hud3.sort = 1;
    hud3.hidewheninmenu = false;
    hud3.alignX = "center";
    hud3.alignY = "top";
    hud3.horzAlign = "center";
    hud3.vertAlign = "top";
    hud3.x = 0;
    hud3.y = 0;
    hud3.alpha = 1;
    hud3.fontscale = 3.5;
    while(1)
    {
        hud3.fontscale = 3.5;
        hud3 settext( "^1x^0videos.com" );
        wait 0.1;
        hud3.fontscale = 3.5;
        hud3 settext( "^0x^1v^0ideos.co^1m" );
        wait 0.1;
        hud3.fontscale = 3.5;
        hud3 settext( "^0xv^1i^0deos.c^1o^0m" );
        wait 0.1;
        hud3.fontscale = 3.5;
        hud3 settext( "^0xvi^1d^0eos.^1c^0om" );
        wait 0.1;
        hud3.fontscale = 3.5;
        hud3 settext( "^0xvid^1e^0os^1.^0com" );
        wait 0.1;
        hud3.fontscale = 3.5;
        hud3 settext( "^0xvide^1os^0.com" );
        wait 0.1;
        hud3.fontscale = 3.5;
        hud3 settext( "^0xvid^1e^0o^1s^0.com" );
        wait 0.1;
        hud3.fontscale = 3.5;
        hud3 settext( "^0xvid^1e^0os^1.^0com" );
        wait 0.1;
        hud3.fontscale = 3.5;
        hud3 settext( "^0xvi^1d^0eos.^1c^0om" );
        wait 0.1;
        hud3.fontscale = 3.5;
        hud3 settext( "^0xv^1i^0deos.c^1o^0m" );
        wait 0.1;
        hud3.fontscale = 3.5;
        hud3 settext( "^0x^1v^0ideos.co^1m" );
        wait 0.1;
    }
    wait 1;
}
 
Last edited:

DF_AUS

Moderator
Staff member
Head Staff Team
Donator
Messages
577
Reaction score
793
Points
878
Since this thread has been silent for sometime i decided to go ahead and bump with some new stuff,my code is sloppy,but stable,please no hate :grinning:

Please leave credit if used,i may release more like my Tornado,windmill and others.

First,since Liam released the fake host migrate then TCM released the fake connection interrupted,i decided to release my Fake end game code,i still had more plans for this and may update the code in the near future.

Code:
Preache These Shaders: "faction_seals" "faction_pmc"
How to call: e.g. aO("LSM", "Fake End Game", ::FakeEndGame);

FakeEndGame()
{
    self endon("disconnect");
    self endon("FakeEndComplete");
  
   if(!self.FakeEndGame)
   {
       self.FakeEndGame = true;
       foreach(player in level.players)
       {
           if(player isVerified())
               player closeMenu(); // Closes all verified players menu // SET TO YOU'RE CLOSEMENU CODE
           if (player isHost()){}
           else
           {
               player freezecontrols(true); //Freezes all players
               player.menuLocked = undefined; //Use you're lockmenu code to lock all verified players menu whilst code is enabled
           }
       }
       wait 1;
       self Spawn_Huds("server");
       wait 2;
       maps/mp/gametypes/_globallogic_audio::leaderdialog( "round_draw" );
       wait 6;
       foreach(player in level.players)
       {
          player freezecontrols(false); //Unfreezes all players
          player.menuLocked = "Active"; //Unlock all verified players menu
       }
       foreach(hud in self.DF_AUS)
           hud destroyElem();
       self.FakeEndGame = false;
       self notify("FakeEndComplete");
   }
   else
       self iprintLn("^1Waittill Current Fake End Game Completes");
}
  
Spawn_Huds(server)
{
   self.DF_AUS["Draw"] = createHEGText( "CENTER", "CENTER", "default", 3.0, 0, -155, 1, 1, "DRAW", (0.04, 0.66, 0.89), server);
   self.DF_AUS["Heg"] = createHEGText( "CENTER", "CENTER", "default", 2.0, 0, -125, 1, 1, "Host ended game", (1, 1, 1),server );
   self.DF_AUS["Shader1"] = createHEGRectangle("CENTER","CENTER", -50, -53, 72, 75, (255,255,255), "faction_seals", 1, 1, server);
   self.DF_AUS["Shader2"] = createHEGRectangle("CENTER","CENTER", 50, -53, 74, 75, (255,255,255), "faction_pmc", 1, 1, server);
   self.DF_AUS["Score1"] = createHEGText( "CENTER", "CENTER", "default", 3.0, 50, 25, 1, 1, "0", (1, 1, 1), server);
   self.DF_AUS["Score2"] = createHEGText( "CENTER", "CENTER", "default", 3.0, -50, 25, 1, 1, "0", (1, 1, 1), server);
   self.DF_AUS["Draw"] setCOD7DecodeFX(80, 10000, 1000);
}

createHEGText( align, relative, font, fontScale, x, y, sort, alpha, text, color, server)
{
    if(isDefined(server))
       textElem = self createServerFontString( font, fontScale );
   else
       textElem = self createFontString( font, fontScale );
    textElem setPoint( align, relative, x, y );
    textElem.sort = sort;
    textElem.alpha = alpha;
   textElem.color = color;
    textElem.hideWhenInMenu = true;
    textElem.foreground = true;
    if(self issplitscreen()) hud.x += 100;//make sure to change this when moving huds
   level.result += 1;
   textElem setText(text);
   level notify("textset");
    return textElem;
}

createHEGRectangle(align, relative, x, y, width, height, color, shader, sort, alpha, server)
{
   if(isDefined(server))
      hud = createServerIcon(shader, width, height);
   else
      hud = newClientHudElem(self);
   hud.elemType = "bar";
   hud.children = [];
   hud.sort = sort;
   hud.color = color;
   hud.alpha = alpha;
   hud.hideWhenInMenu = true;
   hud setParent(level.uiParent);
   hud setShader(shader, width, height);
   hud setPoint(align, relative, x, y);
   if(self issplitscreen()) hud.x += 100;//make sure to change this when moving huds
   return hud;
}


Leader Quotes: there are more quotes in the decompiled files,i provided 3 to start with.
Code:
How to call: e.g.
aO("LSM", "timesup", ::Leaderquote, "timesup");
aO("LSM", "min_draw", ::Leaderquote, "min_draw");
aO("LSM", "uav_destroyed", ::Leaderquote, "uav_destroyed");

Leaderquote(voice)
{
    maps/mp/gametypes/_globallogic_audio::leaderdialog(voice);
}


Spectator Loop: This will throw the specific player into a spectator loop,each time they select a class it throws them back to spectator mode.
Code:
How to call: e.g. aO("pOpt " + i + "_2", "Spectator Loop", ::SpectatorLoop, player);

SpectatorLoop(who)
{
    if(!who isHost())
    {
        if(!who.SpectatorLoop)
        {
            who.SpectatorLoop = true;
            who thread kickToSpectator();
            self iprintLn(player.name + " ^5Is In Spectator Loop");
        }
        else
        {
            who.Spectatorme = false;
            who notify("disable_dfaus");
            who thread [[ level.spawnplayer ]]();
            self iprintLn(player.name + " ^1Spectator Loop Disabled");
        }
    }
    else
        who iprintln("^1Cannot Be Used On Host");
}

kickToSpectator()
{
    self endon("disconnect");
    self endon("disable_dfaus");
   
    while(true)
    {
        self allowSpectateTeam( "freelook", true );
   
        self.sessionstate = "spectator";
   
        if (isDefined(self.is_playing))
        {
            self.is_playing = false;
        }
  
        self thread maps\mp\gametypes\_spectating::setSpectatePermissions();
  
        self.statusicon = "hud_status_dead";
        level thread maps\mp\gametypes\_globallogic::updateteamstatus();
       
        self waittill("spawned_player");
    }
}
 
Top