23.06.2013, 17:20
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;
}

