11.08.2014, 13:51
Hi, im using zcmd and i want to make this even on offline players:
PHP код:
CMD:ip(playerid, params[])
{
if(pInfo[playerid][pAdminLevel] >= 3)
{
new targetid,playerip[16],string[128];
if(sscanf(params, "u", targetid, playerip)) return SendClientMessage(playerid,-1,""chat" /ip [playerid]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
GetPlayerIp(targetid, playerip, sizeof(playerip));
format(string, sizeof(string), ""chat" IP of %s %s", PlayerName(targetid), playerip);
SendClientMessage(playerid, -1, string);
}
else {
SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
}
return 1;
}