Post: [1.13][C++ Script] All Client Stats
05-02-2015, 07:41 AM #1
SC58
Former Staff
(adsbygoogle = window.adsbygoogle || []).push({});

Hello NGU

I have had this for while now and thought people would maybe wanna use this in there sprx menu or for making a auto lobby or something along the line for use of this. :p

This can be C&P to work on Ghosts as well!

You must login or register to view this content.

    
struct msg_t
{
int overflowed;
int readOnly;
char* data;
char* splitData;
int maxsize;
int cursize;
int splitSize;
int readcount;
int bit;
int lastEntityRef;
int targetLocalNetID;
int useZlib;
};

opd_s SV_SendServerCommandMsg_t = { 0x450BDC, TOC };
void(*SV_SendServerCommandMsg)(int clientNum, svscmd_type type, msg_t * msg) = (void(*)(int, svscmd_type, msg_t *))&SV_SendServerCommandMsg_t;
opd_s SV_GetClientPersistentDataBuffer_t = { 0x446FF8, TOC };
char *(*SV_GetClientPersistentDataBuffer)(int clientNum) = (char *(*)(int))&SV_GetClientPersistentDataBuffer_t;

int Client_t(int clientNum)
{
return *(int*)0x223A190 + (0x46480 * clientNum);
}

char * GetClientCurrentStatValue(int clientNum, int statIndex)
{
return SV_GetClientPersistentDataBuffer(clientNum) + statIndex;
}

msg_t msg;
char msgBuffer[0x400];

void AllocateMsg()
{
memset(msgBuffer, 0, 0x400);
memset(&msg, 0, 0x4Cool Man (aka Tustin);
}

void MSG_Init(msg_t *buf, char *data, int length)
{
buf->overflowed = 0;
buf->readOnly = 0;
buf->data = data;
buf->splitData = 0;
buf->maxsize = length;
buf->cursize = 0;
buf->splitSize = 0;
buf->readcount = 0;
buf->bit = 0;
buf->lastEntityRef = 0;
buf->targetLocalNetID = 0;
buf->useZlib = 0;
}

void MSG_WriteByte(msg_t *msg, int c)
{
if (msg->cursize >= msg->maxsize)
msg->overflowed = 1;
else
msg->data[msg->cursize++] = c;
}

void MSG_WriteLong(msg_t *msg, int c)
{
int32_t *dst;

if (msg->maxsize - msg->cursize < 4)
{
msg->overflowed = 1;
}
dst = (int32_t*)&msg->data[msg->cursize];
*dst = c;
msg->cursize += sizeof(int32_t);
}

void MSG_WriteData(msg_t *buf, const void *data, int lenght)
{
for(int i = 0; i < lenght; i++)
{
MSG_WriteByte(buf, ((char*)data)[i]);
}
}

void strncpyz(char *dest, const char *src, int destsize)
{
strncpy(dest, src, destsize - 1);
dest[destsize-1] = 0;
}

void MSG_WriteString(msg_t *sb, const char *s)
{
if (!s)
{
MSG_WriteData(sb, "", 1);
}
else
{
int l;
char string[0x400];

l = strlen(s);
if (l >= 0x400)
{
MSG_WriteData(sb, "", 1);
}
strncpyz(string, s, sizeof(string));
MSG_WriteData(sb, string, l + 1);
}
}

void MSG_WriteBits(msg_t *msg, int bits, int bitcount)
{
if (msg->maxsize - msg->cursize < 4)
{
msg->overflowed = 1;
}

if (bitcount)
{
for (int i = 0; bitcount != i; i++)
{
if (!(msg->bit & 7))
{
msg->bit = 8 * msg->cursize;
msg->data[msg->cursize] = 0;
msg->cursize++;
}

if (bits & 1)
msg->data[msg->bit >> 3] |= 1 << (msg->bit & 7);

msg->bit++;
bits >>= 1;
}
}
}

void MSG_WriteShort(msg_t *msg, int c)
{
signed short* dst;

if (msg->maxsize - msg->cursize < 2)
{
msg->overflowed = 1;
}
dst = (short*)&msg->data[msg->cursize];
*dst = c;
msg->cursize += sizeof(short);
}

void SetStatsInt(int clientNum, int statIndex, int value)
{
AllocateMsg();
MSG_Init(&msg, msgBuffer, 0x400);
MSG_WriteByte(&msg, 0x47);
MSG_WriteLong(&msg, statIndex);
MSG_WriteByte(&msg, sizeof(value));
MSG_WriteBits(&msg, value, 32);
SV_SendServerCommandMsg(Client_t(clientNum), SV_CMD_RELIABLE, &msg);
}

void SetStatsBytes(int clientNum, int statIndex, const void * value)
{
AllocateMsg();
MSG_Init(&msg, msgBuffer, 0x400);
MSG_WriteByte(&msg, 0x47);
MSG_WriteLong(&msg, statIndex);
MSG_WriteByte(&msg, sizeof(value));
MSG_WriteData(&msg, value, sizeof(value));
SV_SendServerCommandMsg(Client_t(clientNum), SV_CMD_RELIABLE, &msg);
}

void SetStatsString(int clientNum, int statIndex, const char * value)
{
AllocateMsg();
MSG_Init(&msg, msgBuffer, 0x400);
MSG_WriteByte(&msg, 0x47);
MSG_WriteLong(&msg, statIndex);
MSG_WriteByte(&msg, strlen(value));
MSG_WriteString(&msg, value);
SV_SendServerCommandMsg(Client_t(clientNum), SV_CMD_RELIABLE, &msg);
}

enum statIndex
{
Prestige = 0x9,
RankXP = 0xA5,
Score = 0xE2,
Kills = 0xB9,
Deaths = 0x91,
Wins = 0x10E,
Losses = 0xC1,
GamesPlayed = 0xA9,
Accuracy = 0x4D,
Class1Name = 0x4DE5
};



Hope you enjoy!
Last edited by SC58 ; 07-22-2016 at 07:35 AM.

The following 20 users say thank you to SC58 for this useful post:

/SneakerStreet/, AutoModder, CuTiXz, DecoyOcToPuS, Geo, ItsLollo1000, LBK, Loxy, Maty360414, oStankyModz, Reyz, Script Kiddie, seb5594, Smoky420, SonyBlack, basshead4ever, SyGnUs, TheLastHelmet, Tustin
05-02-2015, 08:22 PM #11
Xavier Hidden
Are you high?
Now, da fuk is an auto lobby? What use is that for? Nice programming though.
05-02-2015, 09:09 PM #12
SC58
Former Staff
Originally posted by Sabotage View Post
I see that people are saying that this might change something or ruin the game, if it didn't happened with the tool don't think it will happened with this. (There are even less people that know what an SPRX even is and even less people to even have the SDK installed)


Good i hope it does lol :p
05-02-2015, 09:14 PM #13
SC58
Former Staff
Originally posted by Xavier
Now, da fuk is an auto lobby? What use is that for? Nice programming though.




Like bind's for all client's
05-05-2015, 10:15 PM #14
Nice Post !
05-06-2015, 01:07 AM #15
SC58
Former Staff
Originally posted by oStankyModz View Post
Nice Post !


Thanks Smile
05-06-2015, 02:05 AM #16
iDon
I’m too L33T
nice, now find the antiban offsets lol
05-06-2015, 02:15 AM #17
Originally posted by xX View Post
nice, now find the antiban offsets lol


try it yourself even if you fail multiple times its more rewarding Winky Winky , Because someday there may not be someone like sc58 to spoon feed you Winky Winky

The following 5 users say thank you to Connerg123 for this useful post:

LBK, John, SC58, basshead4ever, TrillBrown
05-06-2015, 02:18 AM #18
iDon
I’m too L33T
Originally posted by Connerg123 View Post
try it yourself even if you fail multiple times its more rewarding Winky Winky , Because someday there may not be someone like sc58 to spoon feed you Winky Winky


and that's why we have fuckers like him to do the job and us enjoy it, if you want to get technical. you butt hurt bro bro? pipe down, and get off the nuts, givin me a rash.
05-06-2015, 02:49 AM #19
SC58
Former Staff
Originally posted by xX View Post
and that's why we have fuckers like him to do the job and us enjoy it, if you want to get technical. you butt hurt bro bro? pipe down, and get off the nuts, givin me a rash.


I don't even play online nor really care to find out a bypass as on now.

ps, this game is :sheit:

The following user thanked SC58 for this useful post:

iDon

Copyright © 2025, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo