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