26.03.2014, 19:04
Quote:
@mk124
Can you implement something like this: Dialog::createList("Spawn Vehicle", "Okay", "Oh no") ->addRow("Stallion", 439) ->addRow("Pizzaboy", 44 ->addRow("Turismo", 451) ->addRow("Flatbed", 455) ->addRow("Yankee", 456) ->on("Success", function($player, $dialog, $id) { [...] $vehicle = Vehicle::create($id, $pos->x, $pos->y, $pos->z, $facing); [...] })->showPlayer($player); I mean, that you can give something like a vehicle ID with the ListItem like addRow("Stallion", 439) and then you can receive that Value(439) in the OnDialogResponse Event? |
I believe you could extend the dialog class by adding an "addRow" method and just storing the data in a map that maps from listitem to the value entered. Then OnDialogResponse getDialog().getRowValue(listitem).