22.06.2014, 12:44
hi, please give me cmd:getip for get ip players with admin level 5
CMD:getip(playerid, params[])
{
new target, string[144];
if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, -1, "You're not authorized to use this command.");
if(sscanf(params, "u", target)) return SendClientMessage(playerid, -1, "USAGE: /getip <Part of name/ID>");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid, -1, "Incorrect ID !");
new pip[16], pname[25];
GetPlayerIp(target, pip, sizeof(pip));
GetPlayerName(target, pname, sizeof(pname));
format(string, sizeof(string), "IP of %s: %s", pname, pip);
SendClientMessage(playerid, -1, string);
return 1;
}