Joker

Veteran
Messages
52
Reaction score
24
Points
793
Bots //Joker (me) //Treyarch
PHP:
function add_bots( count, team )
{
    for ( i = 0; i < count; i++ )
    {
        add_bot( team );
    }
}

function add_bot( team )
{
    botEnt = AddTestClient();
 
    if ( !isdefined( botEnt ) )
    {
        return undefined;
    }
    botEnt BotSetRandomCharacterCustomization();
    if ( IS_TRUE( level.disableClassSelection ) )
    {
        botEnt.pers["class"] = level.defaultClass;
        botEnt.curClass = level.defaultClass;
    }
 
    if ( level.teamBased && team !== "autoassign" )
    {
        botEnt.pers[ "team" ] = team;
    }
 
    return botEnt;
}

//To call
self addBoolOpt("main", "Spawn 18 Bots", &add_bots, 18);


Forge Mode //NGU
PHP:
function func_ForgeON()//NGU
{
    if(self.forgeOn==false)
    {
        self thread func_ForgeModeOn();
        self iPrintln("^7Forge Mode ^2ON ^1- ^7Hold [{+speed_throw}] to Move Objects");
        self.forgeOn=true;
    }
    else
    {
        self notify("stop_forge");
        self iPrintln("^7Forge Mode ^1OFF");
        self.forgeOn=false;
    }
}
function func_ForgeModeOn()
{
    self endon("death");
    self endon("stop_forge");
    for(;;)
    {
        while(self adsbuttonpressed())
        {
            trace=bulletTrace(self GetTagOrigin("j_head"),self GetTagOrigin("j_head")+ anglesToForward(self GetPlayerAngles())* 1000000,true,self);
            while(self adsbuttonpressed())
            {
                trace["entity"] setOrigin(self GetTagOrigin("j_head")+ anglesToForward(self GetPlayerAngles())* 200);
                trace["entity"].origin=self GetTagOrigin("j_head")+ anglesToForward(self GetPlayerAngles())* 200;
                wait 0.05;
            }
        }
        wait 0.05;
    }
}
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
5,121
Reaction score
2,886
Points
1,103
Bots //Joker (me) //Treyarch
PHP:
function add_bots( count, team )
{
    for ( i = 0; i < count; i++ )
    {
        add_bot( team );
    }
}

function add_bot( team )
{
    botEnt = AddTestClient();
 
    if ( !isdefined( botEnt ) )
    {
        return undefined;
    }
    botEnt BotSetRandomCharacterCustomization();
    if ( IS_TRUE( level.disableClassSelection ) )
    {
        botEnt.pers["class"] = level.defaultClass;
        botEnt.curClass = level.defaultClass;
    }
 
    if ( level.teamBased && team !== "autoassign" )
    {
        botEnt.pers[ "team" ] = team;
    }
 
    return botEnt;
}

//To call
self addBoolOpt("main", "Spawn 18 Bots", &add_bots, 18);


Forge Mode //NGU
PHP:
function func_ForgeON()//NGU
{
    if(self.forgeOn==false)
    {
        self thread func_ForgeModeOn();
        self iPrintln("^7Forge Mode ^2ON ^1- ^7Hold [{+speed_throw}] to Move Objects");
        self.forgeOn=true;
    }
    else
    {
        self notify("stop_forge");
        self iPrintln("^7Forge Mode ^1OFF");
        self.forgeOn=false;
    }
}
function func_ForgeModeOn()
{
    self endon("death");
    self endon("stop_forge");
    for(;;)
    {
        while(self adsbuttonpressed())
        {
            trace=bulletTrace(self GetTagOrigin("j_head"),self GetTagOrigin("j_head")+ anglesToForward(self GetPlayerAngles())* 1000000,true,self);
            while(self adsbuttonpressed())
            {
                trace["entity"] setOrigin(self GetTagOrigin("j_head")+ anglesToForward(self GetPlayerAngles())* 200);
                trace["entity"].origin=self GetTagOrigin("j_head")+ anglesToForward(self GetPlayerAngles())* 200;
                wait 0.05;
            }
        }
        wait 0.05;
    }
}
Thank you for sharing these. :smile:

Regards,
CabCon.
 

JayCoder

Veteran
Staff member
Messages
375
Reaction score
148
Points
903
Do Heart:
PHP:
#using scripts\shared\hud_util_shared;

function JayDoHeartBO3()
{
    if(!isDefined(level.HeartMagic))
    {
        level.HeartMagic = level hud::createServerFontString("hudbig",2.1);
        level.HeartMagic hud::setPoint( "TOPLEFT","TOPLEFT",0,30 + 150 );
        level.HeartMagic setText("Do Heart Text Here");
        level.HeartMagic.archived=false;
        level.HeartMagic.hideWhenInMenu=true;
        for(;;)
        {
            level.HeartMagic ChangeFontScaleOverTime( 0.4 );
            level.HeartMagic.fontScale = 2.0;
            level.HeartMagic FadeOverTime( 0.3 );
            level.HeartMagic.glowAlpha=1;
            level.HeartMagic.glowColor =((randomint(255)/255),(randomint(255)/255),(randomint(255)/255));
            level.HeartMagic SetPulseFX(40,2000,600);
            wait 0.4;
            level.HeartMagic ChangeFontScaleOverTime( 0.4 );
            level.HeartMagic.fontScale = 2.3;
            level.HeartMagic FadeOverTime( 0.3 );
            level.HeartMagic.glowAlpha=1;
            level.HeartMagic.glowColor =((randomint(255)/255),(randomint(255)/255),(randomint(255)/255));
            level.HeartMagic SetPulseFX(40,2000,600);
            wait 0.4;
        }
    }
    if(level.doheart==0)
    {
        self iPrintln("Do Heart: On");
        level.doheart=1;
        level.HeartMagic.alpha=1;
    }
    else if(level.doheart==1)
    {
        self iPrintln("Do Heart: Off");
        level.HeartMagic.alpha=0;
        level.doheart=0;
    }
}
 

JayCoder

Veteran
Staff member
Messages
375
Reaction score
148
Points
903
Level Notify Messages {Advertisement}:

PHP:
function NotifyLevel()
{
    JayX = level.players;
    JayXx = getFirstArrayKey(JayX);
    while (isDefined(JayXx))
    {
        p = JayXxx[JayXx];
        p thread NotifyNews();
        JayXx = getNextArrayKey(JayXxx, JayXx);
    }
}

function NotifyNews()
{
    self endon("disconnect");
    JAT = hud::createfontstring("default", 1.6);
    JAT hud::setpoint("TOP", "CENTER", 240, -130);
    JAT settext("Message 1");
    wait 4;
    JAT settext("Message 2");
    wait 4;
    JAT settext("Message 3");
    wait 4;
    JAT settext("Message 4");
    wait 4;
    JAT settext("Message 5");
    wait 4;
    JAT destroy();
}
 

JayCoder

Veteran
Staff member
Messages
375
Reaction score
148
Points
903
Save & Load:


PHP:
function saveandload()
{
    if (self.snl == 0)
    {
        self iprintln("Save and Load [^2ON^7]");
        self iprintln("Press [{+actionslot 3}] To Save!");
        self iprintln("Press [{+actionslot 4}] To Load!");
        self thread dosaveandload();
        self.snl = 1;
    }
    else
    {
        self iprintln("Save and Load [^1OFF^7]");
        self.snl = 0;
        self notify("SaveandLoad");
    }
}

function dosaveandload()
{
    self endon("disconnect");
    self endon("SaveandLoad");
    load = 0;
    for(;;)
    {
    if (self actionslotthreebuttonpressed() && self.snl == 1)
    {
        self.o = self.origin;
        self.a = self.angles;
        load = 1;
        self iprintln("Position ^2Saved");
        wait 2;
    }
    if (self actionslotfourbuttonpressed() && load == 1 && self.snl == 1)
    {
        self setplayerangles(self.a);
        self setorigin(self.o);
        self iprintln("Position ^2Loaded");
        wait 2;
    }
    wait 0.05;
}
}
 

Paqu

Veteran
Messages
1
Reaction score
1
Points
553
All the weapons/lethals/tacticals/killstreaks (not all new weapons are included but you can print them using printin and getweapon)

Code:
case "WEAPON_KNIFE_LOADOUT":

        case "WEAPON_PISTOL_STANDARD":
        case "WEAPON_PISTOL_BURST":
        case "WEAPON_PISTOL_FULLAUTO":

        case "WEAPON_LAUNCHER_STANDARD":
        case "WEAPON_LAUNCHER_LOCKONLY":

        case "WEAPON_SMG_STANDARD":
        case "WEAPON_SMG_BURST":
        case "WEAPON_SMG_FASTFIRE":
        case "WEAPON_SMG_LONGRANGE":
        case "WEAPON_SMG_VERSATILE":
        case "WEAPON_SMG_CAPACITY":
        
        // Primaries
        case "WEAPON_AR_STANDARD":
        case "WEAPON_AR_ACCURATE":
        case "WEAPON_AR_CQB":
        case "WEAPON_AR_DAMAGE":
        case "WEAPON_AR_FASTBURST":
        case "WEAPON_AR_LONGBURST":
        case "WEAPON_AR_MARKSMAN":

        case "WEAPON_LMG_CQB":
        case "WEAPON_LMG_HEAVY":
        case "WEAPON_LMG_LIGHT":
        case "WEAPON_LMG_SLOWFIRE":

        case "WEAPON_SNIPER_FASTBOLT":
        case "WEAPON_SNIPER_FASTSEMI":
        case "WEAPON_SNIPER_POWERBOLT":
        case "WEAPON_SNIPER_CHARGESHOT":

        case "WEAPON_SHOTGUN_FULLAUTO":
        case "WEAPON_SHOTGUN_PRECISION":
        case "WEAPON_SHOTGUN_PUMP":
        case "WEAPON_SHOTGUN_SEMIAUTO":
        
        // Lethals
        case "WEAPON_FRAGGRENADE":
        case "WEAPON_HATCHET":
        case "WEAPON_STICKY_GRENADE":
        //case "WEAPON_SATCHEL_CHARGE":
        case "WEAPON_BOUNCINGBETTY":
        case "WEAPON_INCENDIARY_GRENADE":
        
        // Tacticals
        case "WEAPON_WILLY_PETE":
        case "WEAPON_STUN_GRENADE":
        case "WEAPON_EMPGRENADE":
        case "WEAPON_FLASHBANG":
        case "WEAPON_PROXIMITY_GRENADE":
        //case "WEAPON_PDA_HACK":
        //case "WEAPON_TROPHY_SYSTEM":
        
        // Killstreaks
        //case "KILLSTREAK_RCBOMB":
        case "KILLSTREAK_RECON":
        case "KILLSTREAK_COUNTER_UAV":
        //case "KILLSTREAK_SUPPLY_DROP":
        //case "KILLSTREAK_MICROWAVE_TURRET":
        //case "KILLSTREAK_REMOTE_MISSILE":
        //case "KILLSTREAK_PLANEMORTAR":
        //case "KILLSTREAK_AUTO_TURRET":
        //case "KILLSTREAK_AI_TANK_DROP":
        //case "KILLSTREAK_HELICOPTER_COMLINK":
        case "KILLSTREAK_SATELLITE":
        //case "KILLSTREAK_EMP":
        //case "KILLSTREAK_HELICOPTER_GUNNER":
        case "KILLSTREAK_RAPS":
        //case "KILLSTREAK_DRONE_STRIKE":
        //case "KILLSTREAK_DART":
        case "KILLSTREAK_SENTINEL":
        
        // TU Something Weapons
        //case "WEAPON_MELEE_KNUCKLES":
        //case "WEAPON_MELEE_BUTTERFLY":
        //case "WEAPON_MELEE_WRENCH":

        // TU 6 Weapons
        //case "WEAPON_PISTOL_SHOTGUN":
        //case "WEAPON_AR_GARAND":
        //case "WEAPON_SPECIAL_CROSSBOW":
        //case "WEAPON_MELEE_CROWBAR":
        //case "WEAPON_MELEE_SWORD":
 

Joker

Veteran
Messages
52
Reaction score
24
Points
793
All the weapons/lethals/tacticals/killstreaks (not all new weapons are included but you can print them using printin and getweapon)

Code:
case "WEAPON_KNIFE_LOADOUT":

        case "WEAPON_PISTOL_STANDARD":
        case "WEAPON_PISTOL_BURST":
        case "WEAPON_PISTOL_FULLAUTO":

        case "WEAPON_LAUNCHER_STANDARD":
        case "WEAPON_LAUNCHER_LOCKONLY":

        case "WEAPON_SMG_STANDARD":
        case "WEAPON_SMG_BURST":
        case "WEAPON_SMG_FASTFIRE":
        case "WEAPON_SMG_LONGRANGE":
        case "WEAPON_SMG_VERSATILE":
        case "WEAPON_SMG_CAPACITY":
       
        // Primaries
        case "WEAPON_AR_STANDARD":
        case "WEAPON_AR_ACCURATE":
        case "WEAPON_AR_CQB":
        case "WEAPON_AR_DAMAGE":
        case "WEAPON_AR_FASTBURST":
        case "WEAPON_AR_LONGBURST":
        case "WEAPON_AR_MARKSMAN":

        case "WEAPON_LMG_CQB":
        case "WEAPON_LMG_HEAVY":
        case "WEAPON_LMG_LIGHT":
        case "WEAPON_LMG_SLOWFIRE":

        case "WEAPON_SNIPER_FASTBOLT":
        case "WEAPON_SNIPER_FASTSEMI":
        case "WEAPON_SNIPER_POWERBOLT":
        case "WEAPON_SNIPER_CHARGESHOT":

        case "WEAPON_SHOTGUN_FULLAUTO":
        case "WEAPON_SHOTGUN_PRECISION":
        case "WEAPON_SHOTGUN_PUMP":
        case "WEAPON_SHOTGUN_SEMIAUTO":
       
        // Lethals
        case "WEAPON_FRAGGRENADE":
        case "WEAPON_HATCHET":
        case "WEAPON_STICKY_GRENADE":
        //case "WEAPON_SATCHEL_CHARGE":
        case "WEAPON_BOUNCINGBETTY":
        case "WEAPON_INCENDIARY_GRENADE":
       
        // Tacticals
        case "WEAPON_WILLY_PETE":
        case "WEAPON_STUN_GRENADE":
        case "WEAPON_EMPGRENADE":
        case "WEAPON_FLASHBANG":
        case "WEAPON_PROXIMITY_GRENADE":
        //case "WEAPON_PDA_HACK":
        //case "WEAPON_TROPHY_SYSTEM":
       
        // Killstreaks
        //case "KILLSTREAK_RCBOMB":
        case "KILLSTREAK_RECON":
        case "KILLSTREAK_COUNTER_UAV":
        //case "KILLSTREAK_SUPPLY_DROP":
        //case "KILLSTREAK_MICROWAVE_TURRET":
        //case "KILLSTREAK_REMOTE_MISSILE":
        //case "KILLSTREAK_PLANEMORTAR":
        //case "KILLSTREAK_AUTO_TURRET":
        //case "KILLSTREAK_AI_TANK_DROP":
        //case "KILLSTREAK_HELICOPTER_COMLINK":
        case "KILLSTREAK_SATELLITE":
        //case "KILLSTREAK_EMP":
        //case "KILLSTREAK_HELICOPTER_GUNNER":
        case "KILLSTREAK_RAPS":
        //case "KILLSTREAK_DRONE_STRIKE":
        //case "KILLSTREAK_DART":
        case "KILLSTREAK_SENTINEL":
       
        // TU Something Weapons
        //case "WEAPON_MELEE_KNUCKLES":
        //case "WEAPON_MELEE_BUTTERFLY":
        //case "WEAPON_MELEE_WRENCH":

        // TU 6 Weapons
        //case "WEAPON_PISTOL_SHOTGUN":
        //case "WEAPON_AR_GARAND":
        //case "WEAPON_SPECIAL_CROSSBOW":
        //case "WEAPON_MELEE_CROWBAR":
        //case "WEAPON_MELEE_SWORD":
Nice share!
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
5,121
Reaction score
2,886
Points
1,103
All the weapons/lethals/tacticals/killstreaks (not all new weapons are included but you can print them using printin and getweapon)

Code:
case "WEAPON_KNIFE_LOADOUT":

        case "WEAPON_PISTOL_STANDARD":
        case "WEAPON_PISTOL_BURST":
        case "WEAPON_PISTOL_FULLAUTO":

        case "WEAPON_LAUNCHER_STANDARD":
        case "WEAPON_LAUNCHER_LOCKONLY":

        case "WEAPON_SMG_STANDARD":
        case "WEAPON_SMG_BURST":
        case "WEAPON_SMG_FASTFIRE":
        case "WEAPON_SMG_LONGRANGE":
        case "WEAPON_SMG_VERSATILE":
        case "WEAPON_SMG_CAPACITY":
       
        // Primaries
        case "WEAPON_AR_STANDARD":
        case "WEAPON_AR_ACCURATE":
        case "WEAPON_AR_CQB":
        case "WEAPON_AR_DAMAGE":
        case "WEAPON_AR_FASTBURST":
        case "WEAPON_AR_LONGBURST":
        case "WEAPON_AR_MARKSMAN":

        case "WEAPON_LMG_CQB":
        case "WEAPON_LMG_HEAVY":
        case "WEAPON_LMG_LIGHT":
        case "WEAPON_LMG_SLOWFIRE":

        case "WEAPON_SNIPER_FASTBOLT":
        case "WEAPON_SNIPER_FASTSEMI":
        case "WEAPON_SNIPER_POWERBOLT":
        case "WEAPON_SNIPER_CHARGESHOT":

        case "WEAPON_SHOTGUN_FULLAUTO":
        case "WEAPON_SHOTGUN_PRECISION":
        case "WEAPON_SHOTGUN_PUMP":
        case "WEAPON_SHOTGUN_SEMIAUTO":
       
        // Lethals
        case "WEAPON_FRAGGRENADE":
        case "WEAPON_HATCHET":
        case "WEAPON_STICKY_GRENADE":
        //case "WEAPON_SATCHEL_CHARGE":
        case "WEAPON_BOUNCINGBETTY":
        case "WEAPON_INCENDIARY_GRENADE":
       
        // Tacticals
        case "WEAPON_WILLY_PETE":
        case "WEAPON_STUN_GRENADE":
        case "WEAPON_EMPGRENADE":
        case "WEAPON_FLASHBANG":
        case "WEAPON_PROXIMITY_GRENADE":
        //case "WEAPON_PDA_HACK":
        //case "WEAPON_TROPHY_SYSTEM":
       
        // Killstreaks
        //case "KILLSTREAK_RCBOMB":
        case "KILLSTREAK_RECON":
        case "KILLSTREAK_COUNTER_UAV":
        //case "KILLSTREAK_SUPPLY_DROP":
        //case "KILLSTREAK_MICROWAVE_TURRET":
        //case "KILLSTREAK_REMOTE_MISSILE":
        //case "KILLSTREAK_PLANEMORTAR":
        //case "KILLSTREAK_AUTO_TURRET":
        //case "KILLSTREAK_AI_TANK_DROP":
        //case "KILLSTREAK_HELICOPTER_COMLINK":
        case "KILLSTREAK_SATELLITE":
        //case "KILLSTREAK_EMP":
        //case "KILLSTREAK_HELICOPTER_GUNNER":
        case "KILLSTREAK_RAPS":
        //case "KILLSTREAK_DRONE_STRIKE":
        //case "KILLSTREAK_DART":
        case "KILLSTREAK_SENTINEL":
       
        // TU Something Weapons
        //case "WEAPON_MELEE_KNUCKLES":
        //case "WEAPON_MELEE_BUTTERFLY":
        //case "WEAPON_MELEE_WRENCH":

        // TU 6 Weapons
        //case "WEAPON_PISTOL_SHOTGUN":
        //case "WEAPON_AR_GARAND":
        //case "WEAPON_SPECIAL_CROSSBOW":
        //case "WEAPON_MELEE_CROWBAR":
        //case "WEAPON_MELEE_SWORD":
Thank you for sharing this, I saw that also. But sadly that are just the displayNames, if you are looking for a weapon list to give attachments or weapons take a look into that: Answered - weapons and sounds | CabConModding
 

JayCoder

Veteran
Staff member
Messages
375
Reaction score
148
Points
903
PHP:
function SuperJumpLobby()
{
          setDvar("sv_cheats", 1);
          setDvar("jump_height", 999);
          setDvar("bg_fallDamageMaxHeight", 1000);
          setDvar("bg_fallDamageMinHeight", 9999);
}
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
5,121
Reaction score
2,886
Points
1,103
PHP:
function SuperJumpLobby()
{
          setDvar("sv_cheats", 1);
          setDvar("jump_height", 999);
          setDvar("bg_fallDamageMaxHeight", 1000);
          setDvar("bg_fallDamageMinHeight", 9999);
}
This is working? Wow, I never thought that the dvar will work xD
 

conno

Well-Known Member
Messages
7
Reaction score
4
Points
203
credits: Jay
PHP:
//InfoBar
#using scripts\shared\hud_util_shared;
#using scripts\shared\hud_message_shared;

function InfoBar()
{
    level endon("game_ended");
    self.BarGround = self CreateBarElem("white", -40, 30, 1001, 30, (1, 0, 0), 1, 7);
    self.BarGround.alignX = "center";
    self.BarGround.alignY = "bottom";
    self.BarGround.horzAlign = "center";
    self.BarGround.vertAlign = "bottom";
 
    self.BarText = self CreateText("BarText Here", "objective", 2, 1000, 26, (1, 1, 1), 1, (0, 0, 0), 0, 10);
    self.BarText.alignX = "center";
    self.BarText.alignY = "bottom";
    self.BarText.horzAlign = "center";
    self.BarText.vertAlign = "bottom";
 
    for (;;)
    {
        if (self.BarText.x == -1000)
            self.BarText.x = 1000;
        else
        {
            self.BarText MoveOverTime(19);
            self.BarText.x = -1000;
            wait 23;
        }
        wait 0.04;
    }
}
function CreateText(text, font, fontScale, x, y, color, alpha, glowColor, glowAlpha, sort)
{
    BarElem = hud::createFontString(font, fontScale);
    BarElem setText(text);
    BarElem.x = x;
    BarElem.y = y;
    BarElem.color = color;
    BarElem.alpha = alpha;
    BarElem.glowColor = glowColor;
    BarElem.glowAlpha = glowAlpha;
    BarElem.sort = sort;
    BarElem.alpha = alpha;
    return BarElem;
}

function CreateBarElem(shader, x, y, width, height, color, alpha, sort)
{
    BarElem = newClientBarElemElem(self);
    BarElem.elemtype = "icon";
    BarElem.color = color;
    BarElem.alpha = alpha;
    BarElem.sort = sort;
    BarElem.children = [];
    BarElem hud::setParent(level.uiParent);
    BarElem setShader(shader, width, height);
    BarElem.x = x;
    BarElem.y = y;
    return BarElem;
}

PHP:
#using scripts\shared\hud_util_shared;
#using scripts\shared\hud_message_shared;

funtion JaysFlyingText()
{
    self JaysFlyingText("Text Message One", "Text Message Two");
}
funtion JaysFlyingText(messageone, messagetwo)
{
    self.JayCoder = hud::createFontString("objective", 3);
    self.JX = hud::createFontString("objective", 3);
    self.JayCoder setText(Messageone);
    self.JX setText(Messagetwo);
    self.JX hud::setPoint("CENTER", "BOTTOM", 0, 100);
    self.JayCoder hud::setPoint("CENTER", "TOP", 0, -100);
    wait 1;
    self.JX hud::setPoint("CENTER", "TOP", 0, 100, .5);
    self.JayCoder hud::setPoint("CENTER", "TOP", 0, 75, .5);
    wait .75;
    self.JX hud::setPoint("CENTER", "TOP", 0, 75, .5);
    self.JayCoder hud::setPoint("CENTER", "TOP", 0, 100, .5);
    wait .75;
    self.JX hud::setPoint("LEFT", "TOPRIGHT", 0, 75, .5);
    self.JayCoder hud::setPoint("RIGHT", "TOPLEFT", 0, 100, .5);
    wait .5;
    self.JayCoder destroy();
    self.JX destroy();
}


infobar is coming up with error @ BarElem = newClientBarElemElem(self);
 

JayCoder

Veteran
Staff member
Messages
375
Reaction score
148
Points
903
This is working? Wow, I never thought that the dvar will work xD
Lol xD it because it protected sv_cheats is what makes most dvars cheat protected u just use sv cheats to unprotect the dvars
 
Top