Need help, loading data from database
#1

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
Code:
SpawnCar(Vehicle[0][model_id],x,y,z);
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)

Code:
----------------------------------------------------
Vehicle Name               |                  Price
----------------------------------------------------
Sultan                                           $25000
Savana                                          $10000
Sultan's variable id is 845 and Savana variable is 902

now if player click on Sultan, it will spawn
Code:
Vehicle[listitem][vehicle_mode]
Which will spawn Vehicle[0]
Reply


Messages In This Thread
Need help, loading data from database - by akib - 27.01.2019, 10:53

Forum Jump:


Users browsing this thread: 1 Guest(s)