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:
FreezeClient:
InvisibleClient:
ClonePlayer:
GodMode:
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;
}
}