22.05.2017, 20:11
PHP код:
CMD:kick(playerid, params[], help)
{
if(pData[playerid][Admin] >= 3)
{
new id, reason[50],kick[123],Jstring[100+1000];
if(isnull(params)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /kick <Player ID> <Reason>");
sscanf(params, "us[50]", id, reason);
if(IsPlayerConnected(id) && id != playerid)
{
if(pData[playerid][Admin] <= pData[id][Admin]) return SendClientMessage(playerid, COLOR_RED, "You can't kick a high admin level");
if(!isnull(reason))
format(Jstring,sizeof(Jstring),"'%s' has been kicked by administrator %s Reason: %s",GetName(id),GetName(playerid),reason);
else format(Jstring,sizeof(Jstring),"'%s' has been kicked by administrator %s",GetName(id),GetName(playerid));
SendClientMessageToAll(red,Jstring);
format(Jstring,sizeof(Jstring),"[INGAME KICK] %s has kicked %s | %s ",GetName(playerid),GetName(id),reason);
format(kick, sizeof(kick), "02 03*** 6,11 Admin %s (ID: %d) has Kicked %s (ID: %d) Reason: %s.", GetName(playerid),playerid,GetName(id),id,reason);
IRC_GroupSay(groupID, IRC_CHANNEL, kick);
return SetTimerEx("DelayKick",200,false,"d", id);
}
else return SendClientMessage(playerid, COLOR_RED, "That player is not online");
}
else return SendClientMessage(playerid, COLOR_RED, "Sorry, Only +level 3 can use this command");
}