A smaller problem with GetPlayerIP - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: A smaller problem with GetPlayerIP (
/showthread.php?tid=131728)
A smaller problem with GetPlayerIP -
Niixie - 04.03.2010
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
Re: A smaller problem with GetPlayerIP -
Correlli - 04.03.2010
Because IP is a string, use
%s instead of
%i
Re: A smaller problem with GetPlayerIP -
Niixie - 04.03.2010
Arh, Okay. Thank you