[FREE] [Framework Independent] Vehicle Persistence through sessions

Hi guys, I saw there were not a lot of Vehicle Persistence scripts out there so I made one, It is pretty simple as long as the player has a vehicle saved it’ll spawn the player in the vehicle upon reconnect.
Vehicle Health and fuel are maintained across sessions .
Exact usage is in the readme file, Enjoy! and do let me know if u wanted something additional in it or want to suggest any improvements . :smiley:
EDIT : Added Functionality for Auto Saving of vehicles upon player disconnect or crash
This can be enabled or disabled via /toggleautosave command
By default this will be enabled when the script starts.

Requirements mysql-async
Support Yes
7 Likes

Hey, just so I understand, as a player you have to trigger the saving of the vehicle yourself. Let’s say I park the vehicle at the meeting point, press the button, vehicle is saved, I drive to Paleto, have a disconnect and then spawn back in my vehicle at the meeting point?

1 Like

Hi, I added the AutoSaveFunctionality so now you will spawn at the location where you had a disconnect.
Please download the latest version, test it and let me know :smiley: .

Hi, I’m using oxmysql. I can’t seem to save a vehicle. Pressing L does nothing. But the delete option works. Any ideas on this. Regards Minty.

Yea, It’s because the script doesn’t support oxmysql sadly. It only supports mysql-async for now,
I’ll add support for other sql plugins when I get time. Please bear with me till then !

1 Like

No worries, thanks for the reply.

1 Like

tell me when done

This may be something you push to the top of the TODO list. oxmysql has matured and grown to be the de-facto database handler for servers. Most frameworks and resources have switched to it. You’ll have much more success with this script once you can support it.

oxmysql supports any script written for mysql-async though. Completely remove mysql-async from your resources folder and any script trying to access the lua file from mysql-async will be redirected to oxmysql instead.

Not sure if there are limitations but I haven’t found any so far.

Yea it’ll work fine as long as the sql script is loading before this script, I was about to add a “GetResourceName” to dynamically switch dependencies later on into it.

This is not just a concise version of zerodream_ Parking?

I haven’t head of that script sorry. But this one is pretty straightforward tho

does the vehicle stay in the same spot after a server reset?

Hi there !
I’m very interested in this script, but my server framework is using oxmysql…

Do you have an edited script for oxmysql users ???

Many thx :wink:

I do believe it works well with oxmysql. Check the release on GitHub