Problem with /kick command
#1

Hello, I have problem with /kick command. Code:
pawn Код:
CMD:kick(playerid, params[])
    {
        if(PInfo[playerid][adminlevel] == 3) {
            new PID;
            new reason[64];
            new str[128];
            new Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];
            GetPlayerName(playerid, Adminname, sizeof(Adminname));            
            GetPlayerName(PID, Playername, sizeof(Playername));
            if(sscanf(params, "us", PID,reason)) return SendClientMessage(playerid, RAUDONA, "USAGE: /kick [playerid] [reason]");

            if(!IsPlayerConnected(PID))
                return SendClientMessage(playerid, RAUDONA, "Player is not connected!");
            format(str, sizeof(str), "'%s' has been kicked by administrator '%s'. Reason: %s ", Playername, Adminname, reason);
            SendClientMessageToAll(RAUDONA, str);
            Kick(PID);

        }
        else
        {
            SendClientMessage(playerid, RAUDONA, "You have to be level 3 to use that command!"); //return this message
        }
        return 1;
    }
When I tipe it it's kick player but don't show this message:
pawn Код:
format(str, sizeof(str), "'%s' has been kicked by administrator '%s'. Reason: %s ", Playername, Adminname, reason);
            SendClientMessageToAll(RAUDONA, str);
Reply


Messages In This Thread
Problem with /kick command - by Tadas - 31.03.2014, 16:19
Re: Problem with /kick command - by Konstantinos - 31.03.2014, 16:21
Re: Problem with /kick command - by Tadas - 31.03.2014, 16:31

Forum Jump:


Users browsing this thread: 1 Guest(s)