Dialog Strings
#1

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:

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;
}
However, when I execute /editgroup in game, only id 20 shows up, no others. Why?
Reply


Messages In This Thread
Dialog Strings - by BornHuman - 04.01.2015, 05:54
Re: Dialog Strings - by SickAttack - 04.01.2015, 06:27
Re: Dialog Strings - by BornHuman - 04.01.2015, 06:32
Re: Dialog Strings - by SickAttack - 04.01.2015, 06:40

Forum Jump:


Users browsing this thread: 1 Guest(s)