Post: [C++/SPRX] Functions Thread
05-16-2015, 02:40 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Hello NGU Member.
I began the production of the recently SPRX.
Exposes the code that is produced,, if I look to everyone, also becomes the promotion of other people's production, it is also pointed out that if in your code is wrong at the same time, since the relationship of the Win-Win, published I did.
Menu Base uses those of Mr. OSM.
Because still programming is immature, there may be a mistake, but I hope to reference.

The source code is uploaded, we will update from time to time the more content.

Download Link : You must login or register to view this content.
(2015/5/16)


[ Write Process ]
    
int32_t write_process(uint64_t ea, const void * data, uint32_t size)
{
system_call_4(905, (uint64_t)sys_process_getpid(), ea, size, (uint64_t)data);
return_to_user_prog(int32_t);
}


[ Write Memory ]
    
void WriteMemory(int Address, int range, ...)
{
va_list ap;
va_start(ap, range);
for(int i=0; i<range; i++)
*(unsigned char*) (Address + i) = va_arg(ap, char);
va_end(ap);
}
void WriteMemory_char(int Address, int range, unsigned char Offset)
{
*(unsigned char*)(Address + range) = Offset;
}


[ sprintf ]
    
opd_s Com_sprintf_t = { 0x00298874, TOC };
int(*Com_sprintf)(char *dest, int size, const char *fmt, ...) = (int(*)(char* , int, char const *, ...))&Com_sprintf_t;


[ SV_GameSendServerCommand ]
    
opd_s SV = { 0x228FA8, TOC };
void(*svgssc)(int client, int type, char* cmd) = (void(*)(int, int, char*))&SV;

void SV_GSSC(int client, char* command)
{
svgssc(client, 0, command);
}


[ God Mode ]
    
bool GodMode[18];

void GodMode(int client)
{
if (!GodMode[client])
{
*(char*)(0x0FCA41E + (0x280 * client)) = 0xFF, 0xFF;
iPrintln(client, "^5God Mode ^7: [^2Enabled^7]");
GodMode[client] = true;
}
else
{
*(char*)(0x0FCA41E + (0x280 * client)) = 0x00, 0x00;
iPrintln(client, "^5God Mode ^7: [^2Disabled^7]");
GodMode[client] = false;
}
}


[ UFO Mode ]
    
bool UFO[18];

void UFO(int client)
{
if(!Noclip[client] && !UFO[client])
{
*(char*)(0x0110D87F + (0x3980 * client)) = 0x02;
iPrintln(client, "^5UFO Mode ^7: [^2Enabled^7]");
UFO[client] = true;
}
else if(!Noclip[client] && UFO[client])
{
*(char*)(0x0110D87F + (0x3980 * client)) = 0x00;
iPrintln(client, "^5UFO Mode ^7: [^1Disabled^7]");
UFO[client] = false;
}
else
iPrintln(client, "^1Error ^7: [^3Turn off the Noclip^7]");
}


[ Noclip ]
    
bool Noclip[18];
bool UseNoclip[18];

void Noclip(int client)
{
if(!Noclip[client] && !UFO[client])
{
iPrintln(client, "^5[{+actionslot 3}] to Noclip ^7: [^2Enabled^7]");
Noclip[client] = true;
}
else if(Noclip[client] && !UFO[client])
{
*(char*)(0x0110D87F + (0x3980 * client)) = 0x00;
iPrintln(client, "^5[{+actionslot 3}] to Noclip ^7: [^1Disabled^7]");
Noclip[client] = false;
Vars::Client[client].UseNoclip = false;
}
else
iPrintln(client, "^1Error ^7: [^3Turn off the UFO Mode^7]");
}

if(Buttons:HappyetectBtn(i, Buttons::Left))
{
if(Noclip[i])
{
if(!UseNoclip[i])
{
*(char*)(0x0110D87F + (0x3980 * i)) = 0x01;
iPrintln(i, "^5Noclip ^7: [^2Enabled^7]");
UseNoclip[i] = true;
sleep(250);
}
else
{
*(char*)(0x0110D87F + (0x3980 * i)) = 0x00;
iPrintln(i, "^5Noclip ^7: [^1Disabled^7]");
UseNoclip[i] = false;
sleep(250);
}
}
}


[ MW2 Type WallHack ]
    
bool MW2_WallHack[18];
void MW2_WallHack(int client)
{
if(!MW2_WallHack[client])
{
*(char*)(0x0110A297 + (0x3980 * client)) = 0x09;
iPrintln(client, "^5MW2 Type Wall Hack ^7: [^2Enabled^7]");
MW2_WallHack[client] = true;
}
else
{
*(char*)(0x0110A297 + (0x3980 * client)) = 0x00;
iPrintln(client, "^5MW2 Type Wall Hack ^7: [^1Disabled^7]");
MW2_WallHack[client] = false;
}
}


[ Free Camera Mode ]
    
bool Walking_JewFish[18];
void Walking_JewFish(int client)
{
if (!Walking_JewFish[client])
{
*(char*)(0x110A292 + (0x3980 * client)) = 0x99;
iPrintln(client, "^5Free Camera Mode ^7: [^2Enabled^7]");
Walking_JewFish[client] = true;
}
else
{
*(char*)(0x110A292 + (0x3980 * client)) = 0x00;
iPrintln(client, "^5Free Camera Mode ^7: [^2Enabled^7]");
Walking_JewFish[client] = false;
}
}


[ Fake God Mode ]
    
bool FakeGodMode[18];
void FakeGodMode(int client)
{
if (!FakeGodMode[client] && !GodMode[client])
{
iPrintln(client, "^5Fake God Mode ^7: [^2Enabled^7]");
FakeGodMode[client] = true;
}
else if (FakeGodMode[client] && !GodMode[client])
{
WriteMemory(0xFCA41E + (0x280 * client), 3, 0x00, 0x64, 0x00);
WriteMemory(0x110D62E + (0x3980 * client), 3, 0x00, 0x64, 0x00);
WriteMemory(0x110A426 + (0x3980 * client), 2, 0x00, 0x64);
iPrintln(client, "^5Fake God Mode ^7: [^1Disabled^7]");
FakeGodMode[client] = false;
}
else
iPrintln(client, "^1Error ^7: [^3Turn off the God Mode^7]");
}


[ Suicide ]
    
bool SuicidePlayer[18];
void SuicidePlayer(int client)
{
if (!SuicidePlayer[client])
{
*(char*)(0xFCA381 + (0x280 * client)) = 0x01;
iPrintln(client, "^5Player ^7: [^1Suicide^7]");
SuicidePlayer[client] = true;
sleep(500);
*(char*)(0xFCA381 + (0x280 * client)) = 0x00;
SuicidePlayer[client] = false;
}
else
iPrintln(client, "^1Error ^7: [^3Suicide Processing^7]");
}


[ Invisible ]
    
bool Invisible[18];
void Invisible(int client)
{
if (!Invisible[client])
{
*(char*)(0x110D653 + (0x3980 * client)) = 0x02;
iPrintln(client, "^5Invisible ^7: [^2Enabled^7]");
Invisible[client] = true;
}
else
{
*(char*)(0x110D653 + (0x3980 * client)) = 0x00;
iPrintln(client, "^5Invisible ^7: [^1Disabled^7]");
Invisible[client] = false;
}
}


[ Auto Drop Shot ]
    
bool AutoProne[18];

void AutoProne(int client)
{
if (!AutoProne[client])
{
iPrintln(client, "^5Auto Prone ^7: [^2Enabled^7]");
AutoProne[client] = true;
}
else
{
*(char*)(0x110A28D + (0x3980 * client)) = 0x00;
iPrintln(client, "^5Auto Prone ^7: [^1Disabled^7]");
AutoProne[client] = false;
}
}

if (Buttons:HappyetectBtn(client, Buttons::R1))
{
if (AutoProne[client])
{
*(char*)(0x110A28D + (0x3980 * client)) = 0x54;
sleep(100);
*(char*)(0x110A28D + (0x3980 * client)) = 0x00;
}
}


[ Auto Shot ]
    
bool AutoShot[18];
bool UseAutoShot[18];

void AutoShot(int client)
{
if (!AutoShot[client])
{
iPrintln(client, "^5[{+speed_throw}] to Auto Shot ^7: [^2Enabled^7]");
AutoShot[client] = true;
}
else
{
iPrintln(client, "^5[{+speed_throw}] to Auto Shot ^7: [^1Disabled^7]");
AutoShot[client] = false;
UseAutoShot[client] = false;
}
}

if (Buttons:HappyetectBtn(client, Buttons::L1))
{
if (AutoShot[client])
{
if (!UseAutoShot[client])
{
iPrintln(client, "^5Aunto Shot ^7: [^2Enabled^7]");
UseAutoShot[client] = true;
sleep(200);
}
else
{
iPrintln(client, "^5Aunto Shot ^7: [^1Disabled^7]");
UseAutoShot[client] = false;
sleep(200);
}
}
}

if (UseAutoShot[client])
*(char*)(0x110A4C7 + (0x3980 * client)) = 0x01;


[ Low Friction ]
    
bool LowFriction[18];
void LowFriction(int client)
{
if (!LowFriction[client])
{
*(char*)(0x110A28E + (0x3980 * client)) = 0x01;
iPrintln(client, "^5Low Friction ^7: [^2Enabled^7]");
LowFriction[client] = true;
}
else
{
*(char*)(0x110A28E + (0x3980 * client)) = 0x00;
iPrintln(client, "^5Low Friction ^7: [^1Disabled^7]");
LowFriction[client] = false;
}
}


[ Client Walk Speed X2 ]
    
bool SpeedX2[18];
void SpeedX2(int client)
{
if (!SpeedX2[client])
{
*(char*)(0x110D641 + (0x3980 * client)) = 0xFF;
iPrintln(client, "^5Speed x2 ^7: [^2Enabled^7]");
SpeedX2[client] = true;
}
else
{
*(char*)(0x110D641 + (0x3980 * client)) = 0x80;
iPrintln(client, "^5Speed x2 ^7: [^1Disabled^7]");
SpeedX2[client] = false;
}
}


[ All Perks ]
    
int DefaultPerks[18];
bool SetAllPerks[18];
void SetAllPerks(int client)
{
if (!SetAllPerks[client])
{
DefaultPerks[client] = *(int*)0x110A76D + (0x3980 * client);
sleep(10);
char Offset[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00 };
PS3::write_process(0x110A76D + (0x3980 * client), &Offset, sizeof(Offset));
iPrintln(client, "^5All Perks ^7: [^2Given^7]");
SetAllPerks[client] = true;
}
else
{
*(int*)(0x110A76D + (0x3980 * client)) = DefaultPerks[client];
iPrintln(client, "^5Perks ^7: [^1Backed^7]");
SetAllPerks[client] = false;
}
}

void Spawn_Thread(uint64_t arg)
{
for (;Winky Winky
{
if (Vars::Menu.Loaded)
{
for (int client = 0; client < 18; client++)
{
if (Func::IsDead(client))
{
SetAllPerks[client] = false;
}
}
sleep(50);
}
}
}


[ 3rd Person ]
    
void SetThirdPerson(int client, int Change)
{
char buf[100];
Com_sprintf(buf, 100, "q cg_thirdperson %i", Change);
SV_GSSC(client, buf);
}

bool ThirdPerson[18];
void ThirdPerson(int client)
{
if (!ThirdPerson[client])
{
SetThirdPerson(client, 1);
iPrintln(client, "^5ThirdPerson ^7: [^2Enabled^7]");
ThirdPerson[client] = true;
}
else
{
SetThirdPerson(client, 0);
iPrintln(client, "^5ThirdPerson ^7: [^1Disabled^7]");
ThirdPerson[client] = false;
}
}


[ ]
    
Last edited by X_LinGz4-AsTy ; 05-30-2015 at 07:49 PM. Reason: Add Functions

The following 3 users say thank you to X_LinGz4-AsTy for this useful post:

-Numb, Bigmoneyhustlin, ishangiri2014
05-22-2015, 03:36 PM #2
Originally posted by AsTy View Post
Hello NGU Member.
I began the production of the recently SPRX.
Exposes the code that is produced,, if I look to everyone, also becomes the promotion of other people's production, it is also pointed out that if in your code is wrong at the same time, since the relationship of the Win-Win, published I did.
Menu Base uses those of Mr. OSM.
Because still programming is immature, there may be a mistake, but I hope to reference.

The source code is uploaded, we will update from time to time the more content.

Download Link : You must login or register to view this content.
(2015/5/16)

[ Write Memory ]
    
void WriteMemory(int Address, int range, ...)
{
va_list ap;
va_start(ap, range);
for(int i=0; i<range; i++)
*(unsigned char*) (Address + i) = va_arg(ap, char);
va_end(ap);
}
void WriteMemory_char(int Address, int range, unsigned char Offset)
{
*(unsigned char*)(Address + range) = Offset;
}


[ God Mode ]
    
bool GodMode[18];

void GodMode(int client)
{
if (!GodMode[client])
{
*(char*)(0x0FCA41E + (0x280 * client)) = 0xFF, 0xFF;
iPrintln(client, "^5God Mode ^7: [^2Enabled^7]");
GodMode[client] = true;
}
else
{
*(char*)(0x0FCA41E + (0x280 * client)) = 0x00, 0x00;
iPrintln(client, "^5God Mode ^7: [^2Disabled^7]");
GodMode[client] = false;
}
}


[ UFO Mode ]
    
bool UFO[18];

void UFO(int client)
{
if(!Noclip[client] && !UFO[client])
{
*(char*)(0x0110D87F + (0x3980 * client)) = 0x02;
iPrintln(client, "^5UFO Mode ^7: [^2Enabled^7]");
UFO[client] = true;
}
else if(!Noclip[client] && UFO[client])
{
*(char*)(0x0110D87F + (0x3980 * client)) = 0x00;
iPrintln(client, "^5UFO Mode ^7: [^1Disabled^7]");
UFO[client] = false;
}
else
iPrintln(client, "^1Error ^7: [^3Turn off the Noclip^7]");
}


[ Noclip ]
    
bool Noclip[18];
bool UseNoclip[18];

void Noclip(int client)
{
if(!Noclip[client] && !UFO[client])
{
iPrintln(client, "^5[{+actionslot 3}] to Noclip ^7: [^2Enabled^7]");
Noclip[client] = true;
}
else if(Noclip[client] && !UFO[client])
{
*(char*)(0x0110D87F + (0x3980 * client)) = 0x00;
iPrintln(client, "^5[{+actionslot 3}] to Noclip ^7: [^1Disabled^7]");
Noclip[client] = false;
Vars::Client[client].UseNoclip = false;
}
else
iPrintln(client, "^1Error ^7: [^3Turn off the UFO Mode^7]");
}

if(Buttons:HappyetectBtn(i, Buttons::Left))
{
if(Noclip[i])
{
if(!UseNoclip[i])
{
*(char*)(0x0110D87F + (0x3980 * i)) = 0x01;
iPrintln(i, "^5Noclip ^7: [^2Enabled^7]");
UseNoclip[i] = true;
sleep(250);
}
else
{
*(char*)(0x0110D87F + (0x3980 * i)) = 0x00;
iPrintln(i, "^5Noclip ^7: [^1Disabled^7]");
UseNoclip[i] = false;
sleep(250);
}
}
}


[ MW2 Type WallHack ]
    
bool MW2_WallHack[18];
void MW2_WallHack(int client)
{
if(!MW2_WallHack[client])
{
*(char*)(0x0110A297 + (0x3980 * client)) = 0x09;
iPrintln(client, "^5MW2 Type Wall Hack ^7: [^2Enabled^7]");
MW2_WallHack[client] = true;
}
else
{
*(char*)(0x0110A297 + (0x3980 * client)) = 0x00;
iPrintln(client, "^5MW2 Type Wall Hack ^7: [^1Disabled^7]");
MW2_WallHack[client] = false;
}
}


[ Free Camera Mode ]
    
bool Walking_JewFish[18];
void Walking_JewFish(int client)
{
if (!Walking_JewFish[client])
{
*(char*)(0x110A292 + (0x3980 * client)) = 0x99;
iPrintln(client, "^5Free Camera Mode ^7: [^2Enabled^7]");
Walking_JewFish[client] = true;
}
else
{
*(char*)(0x110A292 + (0x3980 * client)) = 0x00;
iPrintln(client, "^5Free Camera Mode ^7: [^2Enabled^7]");
Walking_JewFish[client] = false;
}
}


[ Fake God Mode ]
    
bool FakeGodMode[18];
void FakeGodMode(int client)
{
if (!FakeGodMode[client] && !GodMode[client])
{
iPrintln(client, "^5Fake God Mode ^7: [^2Enabled^7]");
FakeGodMode[client] = true;
}
else if (FakeGodMode[client] && !GodMode[client])
{
WriteMemory(0xFCA41E + (0x280 * client), 3, 0x00, 0x64, 0x00);
WriteMemory(0x110D62E + (0x3980 * client), 3, 0x00, 0x64, 0x00);
WriteMemory(0x110A426 + (0x3980 * client), 2, 0x00, 0x64);
iPrintln(client, "^5Fake God Mode ^7: [^1Disabled^7]");
FakeGodMode[client] = false;
}
else
iPrintln(client, "^1Error ^7: [^3Turn off the God Mode^7]");
}


[ Suicide ]
    
bool SuicidePlayer[18];
void SuicidePlayer(int client)
{
if (!SuicidePlayer[client])
{
*(char*)(0xFCA381 + (0x280 * client)) = 0x01;
iPrintln(client, "^5Player ^7: [^1Suicide^7]");
SuicidePlayer[client] = true;
sleep(500);
*(char*)(0xFCA381 + (0x280 * client)) = 0x00;
SuicidePlayer[client] = false;
}
else
iPrintln(client, "^1Error ^7: [^3Suicide Processing^7]");
}


[ Invisible ]
    
bool Invisible[18];
void Invisible(int client)
{
if (!Invisible[client])
{
*(char*)(0x110D653 + (0x3980 * client)) = 0x02;
iPrintln(client, "^5Invisible ^7: [^2Enabled^7]");
Invisible[client] = true;
}
else
{
*(char*)(0x110D653 + (0x3980 * client)) = 0x00;
iPrintln(client, "^5Invisible ^7: [^1Disabled^7]");
Invisible[client] = false;
}
}


[ Auto Drop Shot ]
    
bool AutoProne[18];

void AutoProne(int client)
{
if (!AutoProne[client])
{
iPrintln(client, "^5Auto Prone ^7: [^2Enabled^7]");
AutoProne[client] = true;
}
else
{
*(char*)(0x110A28D + (0x3980 * client)) = 0x00;
iPrintln(client, "^5Auto Prone ^7: [^1Disabled^7]");
AutoProne[client] = false;
}
}

if (Buttons:HappyetectBtn(client, Buttons::R1))
{
if (AutoProne[client])
{
*(char*)(0x110A28D + (0x3980 * client)) = 0x54;
sleep(100);
*(char*)(0x110A28D + (0x3980 * client)) = 0x00;
}
}


[ Auto Shot ]
    
bool AutoShot[18];
bool UseAutoShot[18];

void AutoShot(int client)
{
if (!AutoShot[client])
{
iPrintln(client, "^5[{+speed_throw}] to Auto Shot ^7: [^2Enabled^7]");
AutoShot[client] = true;
}
else
{
iPrintln(client, "^5[{+speed_throw}] to Auto Shot ^7: [^1Disabled^7]");
AutoShot[client] = false;
UseAutoShot[client] = false;
}
}

if (Buttons:HappyetectBtn(client, Buttons::L1))
{
if (AutoShot[client])
{
if (!UseAutoShot[client])
{
iPrintln(client, "^5Aunto Shot ^7: [^2Enabled^7]");
UseAutoShot[client] = true;
sleep(200);
}
else
{
iPrintln(client, "^5Aunto Shot ^7: [^1Disabled^7]");
UseAutoShot[client] = false;
sleep(200);
}
}
}

if (UseAutoShot[client])
*(char*)(0x110A4C7 + (0x3980 * client)) = 0x01;


[ ]
    


You can save a lot of space and stuff and clean up your code by doing something like this for toggle functions :p

    

int maxclients = 18;

bool godmode[maxclients];

void ToggleGodmode(int client)
{
godmode[client] = !godmode[client];
if(godmode[client]) *(char*)0x133337 = 0xff;
else *(char*)0x13333337 = 0x64;
iPrintln(client, godmode[client] ? "Godmode: ^2On" : "Godmode: ^1Off");
}
05-22-2015, 03:57 PM #3
Originally posted by Black
You can save a lot of space and stuff and clean up your code by doing something like this for toggle functions :p

    

int maxclients = 18;

bool godmode[maxclients];

void ToggleGodmode(int client)
{
godmode[client] = !godmode[client];
if(godmode[client]) *(char*)0x133337 = 0xff;
else *(char*)0x13333337 = 0x64;
iPrintln(client, godmode[client] ? "Godmode: ^2On" : "Godmode: ^1Off");
}


Damn you beat me to it. lol

Copyright © 2025, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo