12.03.2018, 14:40
PHP код:
CMD:whois(playerid, params[])
{
if(connected[playerid] == true) return GameTextForPlayer(playerid, "~r~Spawn First", 5000, 5);
if(pInfo[playerid][Admin] < 3) return SendClientMessage(playerid, -1, "{C3C3C3}(INFO) You don't have the priviliges to use this command.");
{
new str[500], target, ip[90], str2[144];
if(sscanf(params, "u", target)) return SendClientMessage(playerid, -1, "{c3c3c3}(INFO) /whois [id]");
if(target == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "{c3c3c3}(INFO) Player offline.");
GetPlayerIp(target, ip, 16);
GetPlayerCountry(target, str2, sizeof(str2));
format(str, sizeof(str), "{ff0000}%s's ip is '%s' connected from '%s'", PlayerName[target], ip[target], str2[target]);
SendClientMessage(playerid, -1, str);
}
return 1;
}