Help with enums!
#4

This is probably not the best approach to write such function, but it should work.

Код:
stock DisplayLevelCommands(playerid, level)
{
    new count = 0, cmds[128];
    SCMEx(playerid, COLOR_LIGHTRED, "Admin Level %d Commands", level);
    while(count < sizeof(AdminCommands))
    {
        if(AdminCommands[count][aLevel] == level)
        {
            format(mstr, sizeof(mstr), " /%s |", AdminCommands[count][aCommand]);
            strcat(cmds, mstr);
            count++;
            if(count % 8 == 0)
            {
                SCM(playerid, COLOR_WHITE, cmds);
                cmds = "";
            }
        }
    }
    SCM(playerid, COLOR_WHITE, cmds);
    return 1;
}
Reply


Messages In This Thread
Help with enums! - by PaulDinam - 23.06.2013, 16:25
Re: Help with enums! - by Macluawn - 23.06.2013, 16:35
Re: Help with enums! - by NoahF - 23.06.2013, 16:37
Re: Help with enums! - by Youarex - 23.06.2013, 17:20
Re: Help with enums! - by PaulDinam - 23.06.2013, 17:51

Forum Jump:


Users browsing this thread: 1 Guest(s)