IP won't show correctly - 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)
+--- Thread: IP won't show correctly (
/showthread.php?tid=524020)
IP won't show correctly -
Youssef214 - 04.07.2014
why the IP shows as: 49 In these codes (defination):
pawn Код:
new ip[16];
GetPlayerIp(player1, ip, sizeof(ip));
while using it:
pawn Код:
format(string3, sizeof(string3), "More: Muted [%s] | Frozen: [%s] | IP: [%d] | Score: [%d] | Current Warnings: [%d]", MuteType, FreezeType, ip, GetPlayerScore(player1), MaximumWarnings[player1]);
The IP Says: 49, Not the correct ip like: 127.0.0.1
And i am using format for a message and all thing are working, but the IP string doesn't send me the correct player's ip,please help
Re: IP won't show correctly -
rickisme - 04.07.2014
ip is string, not Integer
so change %d to %s
Re: IP won't show correctly -
Youssef214 - 04.07.2014
WTF a stupid mistake, thanks for help