One command to rule them all.
#1

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!
Reply
#2

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.
Reply
#3

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


Forum Jump:


Users browsing this thread: 2 Guest(s)