Advice for a vehicle system - 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: Advice for a vehicle system (
/showthread.php?tid=584365)
Advice for a vehicle system -
siemka321 - 04.08.2015
Hello everyone, I am in a need of some help/advice. I am trying to make a vehicle ownership system, I am using mysql by the way. The player can only have a maximum of 3 vehicles, and the vehicles must be destroyed when the player logs out, but they spawn again once he logs in (Prevent from having too many cars in the server), the vehicles can also be sold to other players.
I tried making the system myself, but it had a lot of problems when it came to spawning. Sometimes the server would spawn a copy of some other player's vehicle, or sometimes when you logged in it didn't spawn the vehicle at all.
So I am here asking for some ideas on how to make a proper vehicle system. What kind of variables should I use? The last time I tried making something like vehicle[NUMBER][INFO], the NUMBER is the row number from the database, and the INFO is all the basic info from the enum.
So, got any ideas? Would love to hear a suggestion. Thank you.