CMD Help
#4

pawn Код:
CMD:suspect(playerid, params[])
{
    new id,discription;
    if(sscanf(params,"us"id,discription)) SendClientMessage(playerid, -1, "USAGE: /su(spect) [id/name] [discription]");
    else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid, -1, "ERROR: Player is not connected.");
    else
    {
        // Do what you want here.
    }
    return 1;
}

CMD:su(playerid, params[])
{
    return command_suspect(playerid, params[]); // Now /su will be the same as /suspect
}
That's pretty much it.
You need sscanf for this.
Reply


Messages In This Thread
CMD Help - by FaZeRs - 09.11.2013, 15:48
Re: CMD Help - by PrivatioBoni - 09.11.2013, 15:52
Re: CMD Help - by Tagathron - 09.11.2013, 15:56
Re: CMD Help - by Stinged - 09.11.2013, 16:01
Re: CMD Help - by erminpr0 - 09.11.2013, 16:09
Re: CMD Help - by FaZeRs - 09.11.2013, 17:07

Forum Jump:


Users browsing this thread: 1 Guest(s)