dialog help
#1

i have a dialog system with this format.


pawn Код:
new MapName[][] =
{
    "Map1",
    "Map2",
    "Map3",
    "Map4",
    "Map5",
    "Map6",
    "Map7",
    "Map8",
    "Map9",
    "Map10",
    "Map11",
    "Map12",
    "Map13"
};
pawn Код:
for (new i = 0;i<sizeof(MapNames);i++)
    {
        if (i == 0) format(info,sizeof(info),"%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n",Map[i]);
        if (i == sizeof(MapNames)-1) format(info,sizeof(info),"%s%s%s%s%s%s%s%s%s%s%s%s%s",info,Map[i]);
        if (i != sizeof(MapNames) && i != 0) format(info,sizeof(info),"%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n",info,Map[i]);
    }
but only 9 maps name are seen. but there is 13 maps name i don't know how to set max limits of 9 to 13. plz help
Reply
#2

Try with this:
pawn Код:
new info[128], map_name[6];
strdel(info,0,128); //clean the string.
for(new m; m < sizeof(MapName); m++)
{
    format(map_name,6,"%s",MapName[m]);
    strins(info,map_name,strlen(info),sizeof(info));
    if(m != sizeof(MapName))
    strins(info,"\n",strlen(info),sizeof(info));
}
//ShowPlayerDialog(playerid,DialogID,DIALOG_STYLE_LIST,"Title",info,"Click","Click 2");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)