Kick command
#1

When a player is kicked, it closes the connection of the player being kicked before it shows the reason.
Anyone know how to make it show why the player was kicked to them before they're kicked?

pawn Код:
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);
        Kick(id);
    }
    return 1;
}
Reply


Messages In This Thread
Kick command - by Noles2197 - 03.02.2013, 17:09
Re: Kick command - by Patrick - 03.02.2013, 17:16
Re : Kick command - by Mathieu371 - 04.02.2013, 12:44
Re: Kick command - by SuperViper - 04.02.2013, 14:34

Forum Jump:


Users browsing this thread: 2 Guest(s)