20.04.2014, 09:52
pawn Код:
COMMAND:kick(playerid,params[]){
if(!Logged{playerid}) return 0;
if(DOF2_GetInt(RFile(playerid),"Admin") <1){SendClientMessage(playerid,COLOR_DENIED,"[ERROR] {FF6969}You not allowed to use this command!"); return 1;}
else{
if(!sscanf(params,"us",p1,Reason)){
if(!IsPlayerConnected(p1)){SendClientMessage(playerid,COLOR_DENIED,"[ERROR] {FF6969}Invalid ID"); return 1;}
GetPlayerName(playerid, AName,sizeof(AName));
GetPlayerName(p1, Name,sizeof(Name));
format(String,sizeof(String),"[ADMIN] {FF6969}%s has been KICKED %s: %s",AName,Name,Reason);
SendClientMessageToAll(COLOR_DENIED,String);
Kick(p1);}else{
SendClientMessage(playerid,COLOR_DENIED,"[ERROR] {FF6969}Usage: /Kick <ID> <REASON>");}}return 1;}