What and how is the concept of creating dynamic Dialogs (listitems)
#2

I'd recommend using Vince's method of storing one list item per dialog ID and then you can easily loop through the returned data, and input "\n" into a combined string. For instance,

pawn Код:
new idx, dialogname[MAX_DIALOG_NAME], listitem[rows];
while(idx < rows)
{
      cache_get_field_content(idx, "ListItemText", listitem[idx], swlConnection);

      format(smallstr, "%s\n", listitem[idx]);
      strcat(string, smallstr, sizeof(string));
}
ShowPlayerDialog(playerid, DIALOG_DYNAMIC_ID, DIALOG_TYPE_LIST, dialogname, string, "button 1", "button 2");
Ofcourse this is in no way a complete example. This just shows one way of loading the data, and showing it as a dialog string.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)