Kicks comand
#4

Untested, should work. Remember to add dcmd(kick,4,cmdtext); under OnPlayerCommandText.

pawn Код:
dcmd_kick(playerid,params[])
{
    new string[128], aname[24], pname[24], id, reason[50];
   
    if(sscanf(params,"us[50]",id,reason)) return SendClientMessage(playerid,-1,"USAGE: /kick [playerid] [reason]");
   
    GetPlayerName(playerid,aname,24); // admin
    GetPlayerName(id,pname,24); // target
   
    if(IsPlayerConnected(id))
    {
        format(string,128,"Admin  %s (%d)  Has Kicked  %s (%d).  Reason:  %s",aname,playerid,pname,playerid, reason);
        print(string); // print to console
        SendClientMessageToAll(-1,string);
        Kick(id);
    }
    return 1;
}
Reply


Messages In This Thread
Kicks comand - by Super_Panda - 05.12.2011, 20:35
Re: Kicks comand - by VanHalen9898 - 05.12.2011, 20:39
Respuesta: Kicks comand - by Super_Panda - 05.12.2011, 20:41
Re: Kicks comand - by grand.Theft.Otto - 05.12.2011, 23:00
Respuesta: Kicks comand - by Super_Panda - 05.12.2011, 23:05
Re: Respuesta: Kicks comand - by Thresholdold - 06.12.2011, 00:28
Re: Kicks comand - by grand.Theft.Otto - 06.12.2011, 02:10
Re: Kicks comand - by VanHalen9898 - 06.12.2011, 22:47

Forum Jump:


Users browsing this thread: 1 Guest(s)