Output ini file to a list dialog
#1

Hello!
O.K - I have *.ini file that contains, for example:
Code:
first,
second,
third,
or
Code:
first
second
third
I can do either ways.
How can I output this list, to a dialog list?
Thank you very much!
Reply
#2

pawn Code:
new text[128],dialog[128];
new File:file = fopen("filehere.ini",io_read);

while(fread(file,text)) {
    if(!strlen(text)) continue;
    format(text,sizeof(text),"%s\n",text);
    strcat(dialog,text);
}
ShowPlayerDialog(playerid,dialogid,YOUR_DIALOG_STYLE,"Caption",dialog,"Button 1","Button 2");
Untested.
Reply
#3

I'll check and return & answer.

Edit: Diaplaying nothing.
Second Edit: By bad. works great! thank you very much.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)