24.12.2012, 16:16
Try this make sure you have
Код:
#include <sscanf2> plugins sscanf
pawn Код:
if(strcmp(cmd, "/getip", true) == 0)
{
new ID;
new player1 = strval(params), string[128];
new tmp3[50]; GetPlayerIp(player1,tmp3,50);
if(sscanf(params, "u", ID))
{
SendClientMessage(playerid,COLOR_ERROR,"Syntax: /getip (playerid)");
return 1;
}
if(!IsPlayerConnected(ID))
{
format(string,sizeof(string),"The Player ID (%d) is not connected to the server.",ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
format(string,sizeof(string),"IP: %s", tmp3);
SendClientMessage(playerid, -1, string);
return 1;
}
