SA-MP Forums Archive
Dialog LIST question. (MySQL) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dialog LIST question. (MySQL) (/showthread.php?tid=155822)



Dialog LIST question. (MySQL) - oliverrud - 19.06.2010

Hey I've been wondering now the last well weeks about if this could be done:

I want to know if you can add more then 1 string on a DIALOG_STYLE_LIST? If theres a way to do so? Since I want it like

pawn Код:
ShowPlayerDialog(playerid,533,DIALOG_STYLE_LIST,"Something","FirstRow\nSecondRow...");
pawn Код:
ShowPlayerDialog(playerid,553,DIALOG_STYLE_LIST,"Something",string1string2string3string4...");
This one above wont work ofcourse since it would just say undefined symbol string1string2string3string4 but is there a way to like seperate them like string1\nstring2\n ...


Re: Dialog LIST question. (MySQL) - Antonio [G-RP] - 19.06.2010

pawn Код:
format(strng, sizeof(string), "%s\r\n%s\r\n%s", string1, string2, string3);
ShowPlayerDialog(playerid, DIALOGID, "BlaBla", string, "Button1", "Button2");
Something like that


Re: Dialog LIST question. (MySQL) - oliverrud - 19.06.2010

Quote:
Originally Posted by ♂ Antonio [G-RP
]
pawn Код:
format(strng, sizeof(string), "%s\r\n%s\r\n%s", string1, string2, string3);
ShowPlayerDialog(playerid, DIALOGID, "BlaBla", string, "Button1", "Button2");
Something like that
Why haven't I thought of that <.< Stupid me, Gonna try it right away.


Re: Dialog LIST question. (MySQL) - Antonio [G-RP] - 19.06.2010

Oops I forgot DIALOG_STYLE_LIST (teehee)

Код:
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "BlaBla", string, "Button1", "Button2");



Re: Dialog LIST question. (MySQL) - oliverrud - 19.06.2010

Oh yea, anyone who can help me on this:

pawn Код:
format(string,256,"SELECT * FROM `mail` WHERE `Receiver` = '%s'",owner);
                mysql_query(string);
                mysql_store_result();
            mysql_fetch_row(row);
                split(row, mailboxlaptop, '|');
Let's say theres 2 rows where Receiver is "owner"

I then want like my dialog to like show both on a DIALOG_STYLE_LIST with each a \n so they go like let's say row 1 is with text: Hello, and row 2 is with text: lol then it would actually show like this:

ShowPlayerDialog(playerid,543543,DIALOG_STYLE_LIST ,"Something","Hello\nlol","Something","Something") ;
Instead of doing such I want a more dynamic way which means I'm trying to make it load it from mysql and then make the showplayer dialog

Anybody who can think of a way?