People stop hating on me! This code helps people with their menus its not hurting anyone!
Code:
opd_s NETWORK_HANDLE_FROM_PLAYER_FUNC_t = { 0x47E00C, TOC };
unsigned int(*NETWORK_HANDLE_FROM_PLAYER_FUNC)(unsigned int a_uiRecevPlayerIndex, int valuePointer) = (unsigned int(*)(unsigned int, int))&NETWORK_HANDLE_FROM_PLAYER_FUNC_t;
opd_s NETWORK_INCREMENT_STATS_t = { 0x12D141C, TOC };
void(*NETWORK_INCREMENT_STATS)(int stats, int value, unsigned int a_uiRecevPlayerIndex) = (void(*)(int, int, unsigned int))&NETWORK_INCREMENT_STATS_t;
unsigned int NETWORK_HANDLE_FROM_PLAYER(unsigned int PlayerIndex)
{
return NETWORK_HANDLE_FROM_PLAYER_FUNC(PlayerIndex, 1);
}
int MPSwitch_Int = 1;
void SetPlayerStats(unsigned int a_uiRecevPlayerIndex, char *Stat_Index, float Value_Index)
{
if (strcmp(UI::_GET_TEXT_SUBSTRING(Stat_Index, 0, 5), "MPPLY") == 0)
{
NETWORK_INCREMENT_STATS(GAMEPLAY::GET_HASH_KEY(Stat_Index), Value_Index, NETWORK_HANDLE_FROM_PLAYER(a_uiRecevPlayerIndex));
}
else
{
char debug[500];
snprintf(debug, sizeof(debug), "MP%i_%s", MPSwitch_Int - 1, Stat_Index);
NETWORK_INCREMENT_STATS(GAMEPLAY::GET_HASH_KEY(debug), Value_Index, NETWORK_HANDLE_FROM_PLAYER(a_uiRecevPlayerIndex));
}
}