Help command with categories.
#6

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
you could do it like that
pawn Код:
CMD:help(playerid, params[])
{
    new
        type[32]
    ;
    if (sscanf(params, "s[32]S()[128]", type, params))
    {
        SendClientMessage(playerid, COL_LIGHTBLUE, ".:| Help |:.");
        SendClientMessage(playerid, COL_ORANGE, "How to use: /Help [NAME]");
        SendClientMessage(playerid, COL_ORANGE, "General|Vehicle|Player|Properties");
        SendClientMessage(playerid, COL_LIGHTBLUE, ".:| Help |:.");
    }
    else if (strcmp(type, "general", true) == 0)
    {
        SendClientMessage(playerid, COL_LIGHTBLUE, ".:| General help |:.");
        SendClientMessage(playerid, COL_ORANGE, "Helpme");
        SendClientMessage(playerid, COL_LIGHTBLUE, ".:| General help |:.");
    }
    return 1;
}
That will extract the first word from params and copy it into type
Lets say I think it does, I didn't test that
Can you explain this line
pawn Код:
if (sscanf(params, "s[32]S()[128]", type, params))
fully?
Reply


Messages In This Thread
Help command with categories. - by xX4m4zingXx - 28.01.2015, 20:04
Re: Help command with categories. - by HazardouS - 28.01.2015, 20:43
Re: Help command with categories. - by xX4m4zingXx - 28.01.2015, 21:44
Re: Help command with categories. - by xX4m4zingXx - 29.01.2015, 15:25
AW: Help command with categories. - by Nero_3D - 29.01.2015, 15:43
Re: AW: Help command with categories. - by xX4m4zingXx - 29.01.2015, 16:27
AW: Re: AW: Help command with categories. - by Nero_3D - 29.01.2015, 17:45
Re: AW: Re: AW: Help command with categories. - by xX4m4zingXx - 29.01.2015, 19:53
Re: Help command with categories. - by Sime30 - 29.01.2015, 20:08

Forum Jump:


Users browsing this thread: 1 Guest(s)