SA-MP Forums Archive
One command to rule them all. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: One command to rule them all. (/showthread.php?tid=409498)



One command to rule them all. - Da_Noob - 21.01.2013

I want a command that can do multiple things. Like: /accept invite, /accept heal, /accept request, /accept contract.
Those kinda things, but I can't make it work. Does anybody know how to make such a command?
I'm using ZCMD and SSCANF, if that helps.

Thanks in advance!


Re: One command to rule them all. - Richie© - 21.01.2013

pawn Код:
CMD:accept(playerid, params[])
{
    new objectives[25];

    if(sscanf(params, "s[25]", objectives))
    {
        SendClientMessage(playerid, COLOR_RED, "{F42626}[Usage] {FFFFFF}/accept [invite/heal]");
    }
    if(!strcmp(objectives, "invite", true))
    {
        //Do you thing.
    }
    return 1;
}
This is how i did it.


Re: One command to rule them all. - Da_Noob - 21.01.2013

Hey, thanks for replying! I'll test it tomorrow when I'm on my other PC. Thanks!