05.11.2013, 11:28
Код:
CMD:kick(playerid,params[]) { new string[128]; new ID; new cmdreason[100]; if(sscanf(params,"us[100]",ID,cmdreason)) { SendClientMessage(playerid,COLOR_ERROR,"USAGE: /adkick (Player Name/ID) (Reason)"); return 1; } if(!IsPlayerConnected(ID)) { format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot kick them.",ID); SendClientMessage(playerid,COLOR_ERROR,string); return 1; } Kicking[ID] =1; format(string,sizeof(string),"[ADMIN] %s(%d) has kicked %s(%d) from the server. Reason: %s.",PlayerName(playerid),playerid,PlayerName(ID),ID,cmdreason); SendClientMessageToAll(COLOR_ADMIN,string); format(string,sizeof(string),"9[ADMIN] Administrator has kicked %s(%d) from the server. Reason: %s.",PlayerName(ID),ID,cmdreason); IRC_GroupSay(gGroupID,IRC_CHANNEL,string); SetTimer("KickPlayer",700,0); return 1; }