SA-MP Forums Archive
Ip Issue - 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: Ip Issue (/showthread.php?tid=179768)



Ip Issue - Code_Red - 28.09.2010

Hey! I Have A Small Problem Each Time I Get A Players IP , I Only Get one Number like 50 or 57


Код:
    new ipi[MAX_PLAYERS],name[MAX_PLAYER_NAME];
    GetPlayerIp(playerid,ipi[playerid],255);
    GetPlayerName(playerid,name,sizeof(name));
    new str[256];
    format(str,sizeof(str),"%s Has Joined The Server! [IP:%s]",name,ipi);
    SendMessageToAdmins(RED,string,1)



Re: Ip Issue - Scenario - 28.09.2010

pawn Код:
new ipi[MAX_PLAYERS];
GetPlayerIp(playerid,ipi[playerid],255);
new str[256];
format(str,sizeof(str),"%s Has Joined The Server! [IP:%d]",n,ipi);
SendMessageToAdmins(RED,string,1)



Re: Ip Issue - Code_Red - 28.09.2010

doesnt work , now it only shows a 0


Re: Ip Issue - rbN. - 28.09.2010

pawn Код:
new ipi[16];
    GetPlayerIp(playerid, ipi, sizeof(ipi));
    new str[256];
    format(str,sizeof(str),"%s Has Joined The Server! [IP:%d]",n,ipi);
    SendMessageToAdmins(RED,string,1)



Re: Ip Issue - Seven. - 28.09.2010

pawn Код:
new ipi[MAX_PLAYERS],name[MAX_PLAYER_NAME];
    GetPlayerIp(playerid,ipi[playerid],16);
    GetPlayerName(playerid,name,sizeof(name));
    new str[256];
    format(str,sizeof(str),"%s Has Joined The Server! [IP:%s]",name,ipi);
    SendMessageToAdmins(RED,string,1);



Re: Ip Issue - Code_Red - 28.09.2010

so ummm.... %d or %s? :S


Re: Ip Issue - deather - 28.09.2010

pawn Код:
new ipi[MAX_PLAYERS][24];
GetPlayerIp(playerid,ipi[playerid],24);
new str[256];
format(str,sizeof(str),"%s Has Joined The Server! [IP:%s]",n,ipi);
SendMessageToAdmins(RED,string,1)



Re: Ip Issue - rbN. - 28.09.2010

Quote:
Originally Posted by Code_Red
Посмотреть сообщение
so ummm.... %d or %s? :S
%s..

pawn Код:
new ipi[16];
    GetPlayerIp(playerid, ipi, sizeof(ipi));
    new str[256];
    format(str,sizeof(str),"%s Has Joined The Server! [IP:%d]",n,ipi);
    SendMessageToAdmins(RED,string,1)
The message you have entered is too short. Please lengthen your message to at least 8 characters.
This forum requires that you wait 120 seconds between posts. Please try again in 4 seconds.



Re: Ip Issue - Seven. - 28.09.2010

Use
Код:
%s



Re: Ip Issue - Code_Red - 28.09.2010

i did use %s then some one told to use %d -.-

P.S: Still not working , its only showing me one number :S