24.12.2012, 15:37
I didn't get what you actually mean, but I hope you're trying to code '/ip [playerid]'. Well here's one with zcmd and sscanf2.
Edit:late.
pawn Код:
CMD:ip(playerid, params[])
{
new p2;
if(sscanf(params, "r", p2)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /ip [playerid]");
if(p2 == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000FF, "Player is offline.");
new ip[16];
GetPlayerIp(p2, ip, sizeof(ip));
new str[128], Lname[MAX_PLAYER_NAME];
GetPlayerName(p2, Lname, sizeof(Lname));
format(str, sizeof(str), "%s's IP:%d", Lname, ip);
SendClientMessage(playerid, 0xFF0000, str);
return 1;
}