12.07.2011, 09:03
This is the way I do it, might be helpful.
It formats the string until the loop is over, then it shows the resulting string.
pawn Код:
format(diagstr, sizeof(diagstr), "ID\tDuel Name\n");
for(new x=0; x<MAX_DUELS; x++)
{
format(dFile, sizeof(dFile), DUELFILES, x);
if(strlen(dini_Get(dFile, "duelName")) > 0) format(diagstr, sizeof(diagstr), "%s%d\t%s\n", diagstr, x, dini_Get(dFile, "duelName"));
else format(diagstr, sizeof(diagstr), "%s%d\tEmpty Slot\n", diagstr, x);
}
ShowPlayerDialog(playerid, DUELDIAG+2, DIALOG_STYLE_LIST, "Duel List", diagstr, "Select", "Exit");