Help with enums!
#5

Thanks Youarex, I made this one something more comfortable:

pawn Код:
stock DisplayLevelCommands(playerid, level)
{
    new count = 0, cmds[128];
    SCMEx(playerid, COLOR_LIGHTRED, "Admin Level %d Commands", level);
    for(new i = 0; i < sizeof(AdminCommands); i++)
    {
        if(AdminCommands[i][aLevel] == level)
        {
            if(count != 0)
                format(mstr, sizeof(mstr), " /%s ", AdminCommands[i][aCommand]);
            else if(count == 0)
                format(mstr, sizeof(mstr), "> /%s ", AdminCommands[i][aCommand]);
            strcat(cmds, mstr);
            count++;
            if(count == 10 || count != 10 && i == sizeof(AdminCommands)-1)
            {
                SCMEx(playerid, -1, "{C3C3C3}%s", cmds);
                count = 0;
                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)