/kick command problem (dcmd)
#1

Hey I got a problem with my /kick [playerid] [reason] command. My code is:

pawn Код:
dcmd_kick(playerid, params[])
{
    new id, reason;
    if (sscanf(params, "uz", id,reason)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /kick [playerid] [reason]");
    else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid,0xFF0000AA, "Player not found");
    else
    {
      new string[256];
      Kick(id);
      format(string,256,"Player %d has been kicked, reason: %s",id,reason);
      SendClientMessageToAll(COLOR_YELLOW,string);
    }
}
Oh yea output ingame: I tried /kick 0 Test yo reason is working as supposed however the id just ended up being 101?
Reply


Messages In This Thread
/kick command problem (dcmd) - by oliverrud - 21.06.2010, 12:28
Re: /kick command problem (dcmd) - by Flashy - 21.06.2010, 12:39
Re: /kick command problem (dcmd) - by oliverrud - 21.06.2010, 12:43
Re: /kick command problem (dcmd) - by NewTorran - 21.06.2010, 12:49
Re: /kick command problem (dcmd) - by oliverrud - 21.06.2010, 12:52
Re: /kick command problem (dcmd) - by Flashy - 21.06.2010, 12:54
Re: /kick command problem (dcmd) - by oliverrud - 21.06.2010, 12:58

Forum Jump:


Users browsing this thread: 1 Guest(s)