18.10.2013, 09:23
You can improve it a bit by not using format for parenteses and removing one of the arrays.
pawn Код:
CMD:ip(playerid,params[])
{
if(!IsPlayerAdmin(playerid)) return SCM(playerid, RED, "UnKnown Command! Type /help");
new targetid;
if(sscanf(params,"u", targetid)) return SCM(playerid, RED, "Getting ip of a player:/ip <playerid>");
if(!IsPlayerConnected(targetid)) return SCM(playerid, RED, "Player is not connected");
new ip[16];
GetPlayerIp(playerid, ip,sizeof (ip));
ShowPlayerDialog(playerid, DIALOG_MSG, DIALOG_STYLE_MSGBOX, "IP", ip, "Close", "");
return 1;
}