SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 27/01/2019, 10:53 AM   #1
akib
Huge Clucker
 
akib's Avatar
 
Join Date: Jun 2016
Location: Bangladesh
Posts: 283
Reputation: 2
Default Need help, loading data from database

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]
__________________
ImKhan#4244
akib is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
It don't change the data on database DarkMythHunter Scripting Help 2 12/09/2018 10:27 AM
Problem with loading data from the database 38 Scripting Help 8 23/07/2017 12:53 PM
Problem with getting data from database TheRox Scripting Help 2 08/09/2014 04:03 PM
Data from MySQL Database not doing it's job Shoulen Scripting Help 5 04/04/2013 03:53 PM
Send data to website, website puts data into Database DeathOnaStick Help Archive 8 27/08/2010 01:34 PM


All times are GMT. The time now is 08:02 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.