26.03.2014, 18:57
@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?
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?