03.07.2011, 06:42
pawn Код:
if(strcmp(cmd, "/kick", true) == 0)
{
if(!IsPlayerAdmin(playerid)) return 1;
new ID,Reason[128], string[128];
if(sscanf(params, "us[128]", ID, Reason)) return SendClientMessage(playerid,WHITE,"USAGE: /Kick [ID] [Reason]");
if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid,RED,"Player not found.");
format(string, sizeof(string),"*** %s Has been kicked by: %s. (%s)",GetName(ID),GetName(playerid),Reason);
SendClientMessageToAll(RED,string);
TogglePlayerControllable(ID,false);
Kick(ID);
return 1;
}