SA-MP Forums Archive
Bug 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: Bug with GetPlayerIp (/showthread.php?tid=170346)



Bug with GetPlayerIp - Minokon - 22.08.2010

Hello
I have some problem. My code:
Код:
new pIp[20];
GetPlayerIp(playerid, pIp, 20);
print(pIp);
On localhost(don't know on hosting) in console always is printed: 255.255.255.255, no 127.0.0.1
What i do bad?


Re: Bug with GetPlayerIp - Sergei - 22.08.2010

You use GetPlayerIp under OnPlayerdisconnect where it returns 255.255.255.255.

Btw, max IP length can be 16 not 20.


Re: Bug with GetPlayerIp - Minokon - 22.08.2010

I know 16, no 20, but this is safetly (my sugestion) xD

@TOPIC
I forget that, i have SavePlayerData in OnPlayerDisconnect xD
Thanks