For some reason its shows the wrong ip for me and shows the same ip for everyone else in a online session wondering why its doing that cant seem to figure out why any advice would be appreciated.
heres the Getip im using for info box...
heres the Getip im using for info box...
Code:
char* GetIP(int playerId)
{
{
if (PLAYER::IS_PLAYER_PLAYING(playerId)) {
char* pName = PLAYER::GET_PLAYER_NAME(selectedPlayer);
char output[76];
unsigned char ip[4];
ip[0] = (UINT16)(pName - 0x49);
ip[1] = (UINT16)(pName - 0x48);
ip[2] = (UINT16)(pName - 0x47);
ip[3] = (UINT16)(pName - 0x46);
sprintf(output, "%u.%u.%u.%u", ip[0], ip[1], ip[2], ip[3]);
printf("%s", output);
return output;
}
} return "0.0.0.0";
}