The correct way to create a player owned 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: The correct way to create a player owned vehicle system (
/showthread.php?tid=182189)
The correct way to create a player owned vehicle system -
jameskmonger - 09.10.2010
I am debating (with myself) about the correct way to create a player owned vehicle system. I was thinking about storing 4 variables to the player's profile.
These would be:
CarModel
CarX
CarY
CarZ
And when they type /getvehicle, a vehicle with the model of CarModel will spawn at CarX, CarY, CarZ.
I was wondering if anyone could think of a more efficient way to get it, and also how would I handle locking, engines, etcetera?
Re: The correct way to create a player owned vehicle system -
Rachael - 09.10.2010
My vehicle ownership system is very complicated, it creates a unique 10 digit number, and creates an ini file using that number.
In the ini file I store the model, color, mods, insurance, destroy count, paint ID, spawn position, any parking tickets, vehicle locks, trunk locks, trunk contents and owner.
Then I simply store the ID of the vehicle in the players user file. This way the players can own more than one vehicle, and 'sell' eachother vehicles.
Re: The correct way to create a player owned vehicle system -
jameskmonger - 09.10.2010
Wow that's a pretty good way to do it

Do you have msn? I would like to attempt making a system like that and would probably want some help with it along the way. It's fine if you don't want to help me, though.