How to
#1

How would i do something like a command with options, such as /help and it would be like /help account /help general, etc. Is it something like checking if the "s", using sscanf, is something or so? Im a bit confused So could someone explain it, or show me an example? Thanks ahead of time.

Reply
#2

pawn Код:
CMD:help(playerid, params[])
{
    if(strcmp(params, "account", true) == 0)
    {
        SendClientMessage(playerid, -1, "Account:");
    }
    else if(strcmp(params, "general", true) == 0)
    {
        SendClientMessage(playerid, -1, "General:");
    }
    else
    {
        SendClientMessage(playerid, -1, "No such command");
    }
    return 1;
}
Reply
#3

Thanks bro, I see how its done now.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)