A smaller problem with GetPlayerIP
#1

Hey, I have a question that should be easy to answer.

I have a code like this

pawn Код:
new IP[16], string[64], pName[MAX_PLAYER_NAME];
GetPlayerIP(playerid, IP, sizeof(IP));
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "%s's IP is %i", pName, IP);
SendClientMessage(playerid, 0xFFFFFF, string);
And when i use it ingame it says that my IP is 46?
Can anyone explain?

//Niixie
Reply
#2

Because IP is a string, use %s instead of %i
Reply
#3

Arh, Okay. Thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)