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 .
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.
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?
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 .
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 !
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.