17.01.2016, 12:49
PHP код:
CMD:kick(playerid, params[])
{
LoginCheck(playerid);
LevelCheck(playerid, 1);
new
string[128],
id,
reason[128]
;
if(sscanf(params, "uS(N/A)[128]", id, reason)) return SendClientMessage(playerid, COLOR_RED, "<!> Syntax Error: /kick [playerid] [reason(Default: N/A)]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "Syntax Error: Player not connected.");
if(User[playerid][accountAdmin] < User[id][accountAdmin]) return SendClientMessage(playerid, COLOR_RED, "Syntax Error: You cannot use this command on higher admin.");
if(id == IsPlayerAdmin(id)) return SendClientMessage(playerid, COLOR_RED, "Syntax Error: Nгo pode kickar um Admin RCON seu noob!");
format(string, sizeof(string), "** %s has been kicked by Adminstrator %s [Reason: %s]", pName(id), pName(playerid), reason);
SendClientMessageToAll(COLOR_GREY, string);
#if LOG == true
SaveLog("kicklog.txt", string);
#endif
KickDelay(id);
return 1;
}