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, 07:42 AM #2
KAOSxGaming
At least I can fight
Originally posted by SC58 View Post

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!


gg rip AW even more. Good work Though SC58! Tiphat
05-02-2015, 07:45 AM #3
SC58
Former Staff
Originally posted by KAOSxGaming View Post
gg rip AW even more. Good work Though SC58! Tiphat


Prob lol and thanks Happy
05-02-2015, 09:09 AM #4
Zambie
< ^ > < ^ >
Originally posted by SC58 View Post

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!


Good thing i play aw on ps4 now xD. Nicely done though bro
05-02-2015, 09:27 AM #5
Sabotage
Gaming Squad
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)

The following user thanked Sabotage for this useful post:

Xavier Hidden
05-02-2015, 09:59 AM #6
akra115
Bounty hunter
all i need is a eboot antiban :(
05-02-2015, 10:05 AM #7
Reyz
Banned
Originally posted by SC58 View Post

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!


Great work bud, keep it up Winky Winky
05-02-2015, 01:51 PM #8
How do you use this????
05-02-2015, 02:34 PM #9
garpbaldo
Bounty hunter
Originally posted by Lazy
How do you use this????


lol you don't even know it is
05-02-2015, 08:13 PM #10
Swaqq
Professional Thanker
Nice, I am working on a menu rn, great to see another release Winky Winky

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo