Need a little help with kick command
#1

How can i add a reason why was player kicked to this command, example: Admin Matej kicked John for weapon hax.

pawn Код:
dcmd_kick(playerid,params[])
{
    new id,n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME];
    new tmp[256], Index, str[49];
    tmp = strtok(params,Index), id = strval(tmp);
    GetPlayerName(id,on,sizeof(on));
    GetPlayerName(playerid,n,sizeof(n));
    if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,ORANGE,"You need to be level 3 to use this command!");
    if(!strlen(params)) return SendClientMessage(playerid,GREY,"USAGE: /kick <ID> ");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,GREY,"Invalid ID");
    format(str,sizeof(str),"Administrator %s has kicked %s",n,on);
    SendClientMessageToAll(0xFF0000FF,str);
    Kick(id);
    return 1;
}
Reply


Messages In This Thread
Need a little help with kick command - by Matej_ - 18.10.2010, 10:10
Re: Need a little help with kick command - by Voldemort - 18.10.2010, 10:54
Re: Need a little help with kick command - by Matej_ - 18.10.2010, 11:23
Re: Need a little help with kick command - by Matej_ - 18.10.2010, 11:31
Re: Need a little help with kick command - by Ironboy500[TW] - 18.10.2010, 12:27

Forum Jump:


Users browsing this thread: 2 Guest(s)