Kick problem
#1

Everything is working but only 1 thing isn't, and i dont know how to fix this. Here is my kick command:

pawn Код:
CMD:kick(playerid,params[])
{
    new id,reason[50];
    if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid,COLOR_RED,"[ERROR] You've to be an level 1 admin to use this command.");
    else if(sscanf(params,"us[128]",id,reason)) return SendClientMessage(playerid,COLOR_GREY,"[SYNTAX] Usage: /kick [playerid] [Reason]");

    else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"[ERROR] That player isn't connected.");
    else
    {
    new string[124];
    new name[MAX_PLAYER_NAME];
    new nname[MAX_PLAYER_NAME];
    GetPlayerName(id,name,MAX_PLAYER_NAME);
    GetPlayerName(playerid,nname,MAX_PLAYER_NAME);
    format(string,sizeof(string),"[KICK] %s has been kicked by %s [Reason: %s]",name,nname,string);
    SendClientMessageToAll(COLOR_RED,string);
    Kick(id);
    }
    return 1;
}
If i kick someone, all the players will get the message: [KICK] %s has been kicked by %s [Reason: %s].
But it isn't showing the reason. He will give this: [KICK] test has been kicked by test [Reason: ].
Please help.
Reply


Messages In This Thread
Kick problem - by MechaTech - 26.05.2012, 09:44
Re: Kick problem - by JaTochNietDan - 26.05.2012, 09:47
Re: Kick problem - by MechaTech - 26.05.2012, 10:15

Forum Jump:


Users browsing this thread: 1 Guest(s)