Skip to content

Mexalucard0/esx-persistent-vehicles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esx-persistent-vehicles

This mod prevents vehicles from disappearing in OneSync ESX multiplayer servers. It can also respawn vehicles in their previous location after a server restart.

Requirements

FiveM Version >=2443

OneSync - This mod will not work without OneSync.

esx_vehicleshop

Installation

Download from the releases tab in GitHub. Extract and place the esx-persistent-vehicles in your resources folder. Start the resource.

start esx-persistent-vehicles

Check config.lua and ensure the details match your database schema.

Usage

To make a vehicle persistent, pass it's license plate to the event below. This event cannot be called on the client with TriggerServerEvent, it must be called server side.

TriggerEvent('persistent-vehicles/register-vehicle', plate)

Stop a vehicle from being persistent and allow it to be removed as normal. Does not delete the vehicle.

TriggerEvent('persistent-vehicles/forget-vehicle', plate)

Before you shutdown your server you will need to save the vehicles to file. This will ensure that the vehicles spawn in the exact same location when the server comes back online.

TriggerEvent('persistent-vehicles/save-vehicles-to-file')

Alternatively you can stop the resource which will do this automatically.

StopResource('esx-persistent-vehicles')

Console

Cull persistent vehicles

pv-cull <number of vehicles>

Unpersist vehicles

pv-forget-all

Toggle console debugging messages

pv-toggle-debugging

Save all persistent vehicles to file. Can be called before reboot.

pv-save-to-file

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Support

Discord

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages