Making a /saveveh command? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Making a /saveveh command? (
/showthread.php?tid=357907)
Making a /saveveh command? -
Jarok - 08.07.2012
Hello guys,
I have almost finished my server but I need a little help.
Here is my MySQL "vehicle" table format:
How would I make a command /vehsave and it would save the vehicle into MySQL and everytime I loaded my gamemode it would load the vehicles?
Thanks.
Re : Making a /saveveh command? -
Urefeu - 08.07.2012
It's easy!
You have to create the /vehsave command, in which you put a loop that iterates through all the vehicles, which retrieves their models, angles and coordinates, then with mysql plugin, for each vehicle, you insert a row into your database.
For the script, I'm not going to make you, you can search the internet, I've just given the way forward.
Urefeu
Re: Making a /saveveh command? -
Speed++ - 08.07.2012
Make into the database, a posX PosY Pos> PosR, in float... Color1 and Color2 Hex... not int
Re: Making a /saveveh command? -
Jarok - 08.07.2012
EDIT: Fixed.
But can someone help me with this?;/