04.01.2015, 05:54
I have a max amount of groups set to 20, starting from 0 to 19. I want to loop through them and make a dialog for them in the blow command:
However, when I execute /editgroup in game, only id 20 shows up, no others. Why?
pawn Code:
command(editgroup, playerid, params[])
{
if(Player[playerid][AdminLevel] >= 1337)
{
new string[128];
for(new i = 0; i < MAX_GROUPS; i++)
{
format(string, sizeof(string), "Groups/Group_%d.ini", i);
if(fexist(string))
{
format(string, sizeof(string), "%d.) %s\n.", i, Groups[i][GroupName]);
ShowPlayerDialog(playerid, 9001, DIALOG_STYLE_LIST, "Groups | Edit Group", string, "Select", "Cancel");
}
}
}
return 1;
}