Skip to content

A simple standalone Vehicle Persistence script that saves the vehicle and location you are in when you press the "L" key and when you reconnect to the server it will respawn you into that vehicle in that location, keeping the vehicles health, fuel, heading etc the same.

License

Notifications You must be signed in to change notification settings

Ezio121/Fivem-Vehicle-Persistence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fivem-Vehicle-Persistence

A simple Vehicle Persistence script that saves the vehicle and location you are in when you press the "L" key and when you reconnect to the server it will respawn you into that vehicle in that location, keeping the vehicles health, fuel, heading etc the same.

It works with all frameworks.

Dependency: mysql-async

Usage: Add it to the resources folder and then put ensure Fivem-Vehicle-Persistence in the server beflow the mysql-async

1.Press L to save a vehicle in your database Each player can only save one vehicle this way. As long as a vehicle is saved, when a player reconnects they spawn in that vehicle, persisting all the vehicle data

2.Press [ to delete the vehicle from the database so that the auto spawn doesn't happen

  1. /toggeautosave command disables/enables auto saving of vehicle data into the database when a player disconnects When it is enabled Players don't need to save their vehicle information manually, when they disconnect from the server or crash, the script autosaves the vehicle details and loads them when the player respawns.

Note: 1.Keys can be configured at the top of the client.lua 2.Remember that manual entries are not auto deleted as player might want to keep those checkpoints, so if you manually save your vehicle data into the database by pressing the key, you will also have to delete it by pressing the specified key or else you will respawn there upon reconnect.

For any issues contact me @Discord(badassfalcon)

About

A simple standalone Vehicle Persistence script that saves the vehicle and location you are in when you press the "L" key and when you reconnect to the server it will respawn you into that vehicle in that location, keeping the vehicles health, fuel, heading etc the same.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages