03.11.2014, 07:01
pawn Код:
forward Delaykick(playerid);
public Delaykick(playerid)
{
Kick(playerid);
}
CMD:kick(playerid,params[])
{
new id,reason[100],msg[128],pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
if(PlayerInfo[playerid][Admin] < 1) return SendMessage(playerid,COLOR_TEAM2,"You can't use this command","Ban khong the su dung lenh nay");
if(sscanf(params,"us[100]",id)) return SendMessage(playerid,COLOR_TEAM2,"USAGE:/kick [id]","SuDung:/kick [id] [reason]");
if(!IsPlayerConnected(id)) return SendMessage(playerid,COLOR_TEAM2,"Player not connect","Nguoi choi khong online");
format(msg,sizeof(msg),"%s has been kicked by administration REASON: %s",pname,reason);
SendClientMessageToAll(-1,msg);
SetTimerEx("DelayKick",500,false,"i",playerid);
return 1;
}