04.02.2013, 12:44
pawn Код:
forward @Kick(playerid);
public @Kick(playerid) return Kick(playerid);
CMD:kick(playerid, params[])
{
if(pInfo[playerid][Admin]>0)
{
new str[128],reason[64],id;
if(sscanf(params,"ds[64]",id,reason)) return SendClientMessage(playerid,COLOR_GRAY,"USAGE: /kick [playerid] [reason]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Invalid playerid!");
format(str,sizeof(str),"Staff member %s kicked %s for %s.",GetName(playerid),GetName2(id),reason);
SendClientMessageToAll(COLOR_RED,str);
printf("%s",str);
SetTimerEx("@Kick", 1000, false, "d", id);
}
return 1;
}