Posts: 354
Threads: 24
Joined: Oct 2012
Reputation:
0
So, basically I want to attach data to a specific list item of a dynamic dialog and afterwards get that data when a user selects that item. How would I go about doing that?
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
What sort of data? Use an array then do array[listitem] and stuff blah blah
Posts: 24
Threads: 2
Joined: May 2013
Reputation:
0
You could use an array, but I personally prefer sticking to defines for dialog ID's or listitem's
I.E.,
#define Item_GPS 0 //Item ID 0
#define Item_ExtraThinCondoms 1 //Item ID 1
if(listitem == Item_GPS)
{
SendClientMessage(playerid,COLOR_RED,"Oh, you need a GPS? Too bad.");
}
etc. You get the idea.
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
Someone should write a library for easy dialog responses. Doesn't y_dialog have that?