command question
#7

Код:
CMD:kick(playerid, params[]) // params is a string.
{
       new id;

       // you missed an extra bracket after 'id'
       if(sscanf(params, "u", id))  return scm(playerid, COLOR_USAGE, "USAGE:/kick [id]");
       if(id == INVALID_PLAYER_ID) return scm(playerid, COLOR_ERROR, "invalid id");

       Kick(id);
       return 1;
}
The code you have just given us is perfectly fine. I've improved it where I've noticed a couple of issues.
Reply


Messages In This Thread
command question - by GameOvr - 09.09.2018, 08:14
Re: command question - by Kane - 09.09.2018, 08:16
Re: command question - by GameOvr - 09.09.2018, 08:18
Re: command question - by Kane - 09.09.2018, 08:20
Re: command question - by DarknesS1988 - 09.09.2018, 08:20
Re: command question - by Calisthenics - 09.09.2018, 08:25
Re: command question - by Infin1ty - 09.09.2018, 09:27
Re: command question - by GameOvr - 09.09.2018, 11:32

Forum Jump:


Users browsing this thread: 1 Guest(s)