How to make command, with one word argument?
#3

pawn Код:
CMD:test(playerid, params[])
{
    if(isnull(params)) return SendClientMessage(playerid, -1, "Usage: /test <test1/test2>");
    if(!strcmp(params, "test1", true))
    {
        // Do something;
    }
    else if(!strcmp(params, "test2", true))
    {
        // Do something;
    }
    else SendClientMessage(playerid, -1, "Usage: /test <test1/test2>");
    return 1;
}
Reply


Messages In This Thread
How to make command, with one word argument? - by Micius - 06.08.2013, 11:28
Re: How to make command, with one word argument? - by McLuhan - 06.08.2013, 11:30
Re: How to make command, with one word argument? - by Konstantinos - 06.08.2013, 11:31

Forum Jump:


Users browsing this thread: 1 Guest(s)