27.01.2019, 10:53
Hello, i was trying to make a dealership system dynamic
CMD will be /adddealer /adddealercar
Everything is fine but problem is OnDialogResponse
when player do /buycar on a dealership i can show them specified vehicles for the dealership in a dialog but when player click on the first item on the dialog then it will select 0.
so the code will be like
but if the car's variable number is 345 then how i can spawn it? (Car variable value isn't fixed, it can be 240,410,1)
Sultan's variable id is 845 and Savana variable is 902
now if player click on Sultan, it will spawn
Which will spawn Vehicle[0]
CMD will be /adddealer /adddealercar
Everything is fine but problem is OnDialogResponse
when player do /buycar on a dealership i can show them specified vehicles for the dealership in a dialog but when player click on the first item on the dialog then it will select 0.
so the code will be like
Code:
SpawnCar(Vehicle[0][model_id],x,y,z);
Code:
---------------------------------------------------- Vehicle Name | Price ---------------------------------------------------- Sultan $25000 Savana $10000
now if player click on Sultan, it will spawn
Code:
Vehicle[listitem][vehicle_mode]