[C++] Bo2 CODE THREAD

Venox

Moderator
Messages
93
Reaction score
73
Points
808
Hello CabconModding!

The purpose of this thread is sharing functions.
But please, don't just copy-paste everything into your menubase. Please try and understand how everything works.
>Update the Addresses to 1.19<
>More Options soon<


UnlimitedAmmo:
Code:
void UnlimitedAmmo(int client)
{
    if (!Ammo[client])
    {
        *(char*)(0x0178135d + (client * 0x5808)) = 0x0064;
        *(char*)(0x01781361 + (client * 0x5808)) = 0x0064;
        *(char*)(0x01781365 + (client * 0x5808)) = 0x0064;
        *(char*)(0x01781359 + (client * 0x5808)) = 0x0064;
        *(char*)(0x01781395 + (client * 0x5808)) = 0x0064;
        *(char*)(0x0178135d + (client * 0x5808)) = 0x0064;
        *(char*)(0x01781391 + (client * 0x5808)) = 0x0064;
        *(char*)(0x0178138d + (client * 0x5808)) = 0x0064;
        SV_GameSendServerCommand(client, "O \"Infinite Ammo: ^2Enabled \"");
        Ammo[client] = true;
    }
    else if (Ammo[client])
    {
        *(char*)(0x0178135d + (client * 0x5808)) = 0x0000;
        *(char*)(0x01781361 + (client * 0x5808)) = 0x0000;
        *(char*)(0x01781365 + (client * 0x5808)) = 0x0000;
        *(char*)(0x01781359 + (client * 0x5808)) = 0x0000;
        *(char*)(0x01781395 + (client * 0x5808)) = 0x0000;
        *(char*)(0x0178135d + (client * 0x5808)) = 0x0000;
        *(char*)(0x01781391 + (client * 0x5808)) = 0x0000;
        *(char*)(0x0178138d + (client * 0x5808)) = 0x0000;
        SV_GameSendServerCommand(client, "O \"Infinite Ammo: ^1Disabled \"");
        Ammo[client] = false;
    }
}

FreezeClient:
Code:
void FreezeClient(int client)
{
    if (!Freeze[client])
    {
        *(char*)(0x17865BF + (client * 0x5808)) = 0x0F;
        SV_GameSendServerCommand(client, "O \"Freeze: ^2Enabled \"");
        Freeze[client] = true;
    }
    else if (Freeze[client])
    {
        *(char*)(0x17865BF + (client * 0x5808)) = 0x00;
        SV_GameSendServerCommand(client, "O \"Freeze: ^1Disabled \"");
        Freeze[client] = false;
    }
}


InvisibleClient:
Code:
void InvisibleClient(int client)
{
    if (!Invisible[client])
    {
        *(char*)(0x1781025 + client * 0x5808) = 0x01;
        SV_GameSendServerCommand(client, "O \"Invisibility: ^2Enabled \"");
        Invisible[client] = true;
    }
    else if (Invisible[client])
    {
        *(char*)(0x1781025 + client * 0x5808) = 0x00;
        SV_GameSendServerCommand(client, "O \"Invisibility: ^1Disabled \"");
        Invisible[client] = false;
    }
}


ClonePlayer:
Code:
void ClonePlayer(int client)
        {
            *(int*)0x001F6564 = *(int*)0x38600000;
            int patch = 0x001F6564 + 2;
            *(short*)patch = *(short*)client;
            opd_s call = { 0x01F6528, TOC };
            void(*Clone)(int client) = (void(*)(int))&call;
            Clone(client);
        }


GodMode:
Code:
void GodModeOpt(int client)
{
    if (!GodMode[client])
    {
        *(char*)(0x1780F43 + (client * 0x5808)) = 0x05;
        SV_GameSendServerCommand(client, "O \"GodMode: ^2Enabled \"");
        GodMode[client] = true;
    }
    else if (GodMode[client])
    {
        *(char*)(0x1780F43 + (client * 0x5808)) = 0x08;
        SV_GameSendServerCommand(client, "O \"GodMode: ^1Disabled \"");
        GodMode[client] = false;
    }
}
 

God

Skiddy
Messages
337
Reaction score
235
Points
818
I coded it myself but its not hard so lol
precache the arrow model also btw
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);
}

Electro Cherrio
ElectricCherry_Perk()
{
if(self.Cherry==false)
{
self.Cherry=true;
self thread ElectricCherry();
self iPrintlnbold("Electric Cherry: On");
}
else
{
self.Cherry=false;
self notify("Stop_Cherry");
self iPrintlnbold("Electric Cherry: Off");
}
}
ElectricCherry()
{
self endon("death");
self endon("Stop_Cherry");
self iprintln("You Now Have Electric Cherry");
for(;:wink:
{
self waittill("reload_start");
playFxOnTag( level._effect["prox_grenade_player_shock"], self, "j_wrist_ri");
playFxOnTag( level._effect["prox_grenade_player_shock"], self, "j_elbow_ri");
playFxOnTag( level._effect["prox_grenade_player_shock"], self, "j_elbow_le");
playFxOnTag( level._effect["prox_grenade_player_shock"], self, "tag_weapon_right");
playFxOnTag( level._effect["prox_grenade_player_shock"], self, "right_hand_ik");
playFxOnTag( level._effect["prox_grenade_player_shock"], self, "left_hand_ik");
self PlaySound("wpn_taser_mine_zap");
self EnableInvulnerability();
RadiusDamage(self.origin, 130, 700, 350, self, "MOD_PROJECTILE_SPLASH");
wait 1;
self DisableInvulnerability();
}
}

this is sprx m9
 

Harry

Certified Sick ℂunt
Premium Member
Messages
1,253
Reaction score
942
Points
973
lol ban those hahaha why? Because I started them on here :smile:
Because, information can be given about another user on here, ie: (If you were clever), all IP addresses that see that IMG get sent to you, which you can then use for DDoS or DOX etc.
 

Ways

Veteran
Messages
141
Reaction score
45
Points
803
Because, information can be given about another user on here, ie: (If you were clever), all IP addresses that see that IMG get sent to you, which you can then use for DDoS or DOX etc.
lol ok haha
 

Throwie

Veteran
Messages
312
Reaction score
79
Points
803
Code:
developer 0;developer_script 0
This is to remember to activate in the console on pc in bo2.
 
Top