shared/config.lua. This page provides a line-by-line explanation of each setting.
[!NOTE] Are you looking for Framework, Garage, or Keys settings? ts-persistence is fully independent! All bridges (QBCore, ESX, qs-vehiclekeys, qb-garages…) are now handled exclusively byts-lib. You can set them ints-lib/shared/config.lua.
Bridge Settings
If set to
true, the script will sync visual vehicle deformation using the VehicleDeformation plugin. More info here.Global Settings
When enabled, any trailer attached to a vehicle will also be saved and restored when the main vehicle spawns.
When enabled, all vehicles will be permanent. This means that vehicles will not be deleted after a reboot or script restart.
Client Settings
Enables or disables client-side debug prints in the F8 console.
Function used to retrieve the current fuel level of a vehicle. By default, it uses the native
GetVehicleFuelLevel.Function called to apply fuel level to a vehicle. Custom fuel scripts (like LegacyFuel) can be integrated here.
The distance (in units) at which a persisted vehicle will start to spawn when a player approaches. If the vehicle was not already spawned.
The maximum time (in ms) the client will wait for the vehicle entity to exist after the server triggers the spawn. Do not change this value unless you know what you are doing.
The maximum time (in ms) the client will wait to gain network control of the spawned vehicle before giving up. Do not change this value unless you know what you are doing.
Number of attempts to re-apply vehicle properties (mods, colors) if a mismatch is detected after spawning. Default is 1. Do not change this value unless you know what you are doing.
Handles local door locking. It receives the raw GTA lock status (1 = unlocked, 2 = locked, etc.). See more at FiveM Natives.
A function that returns
true or false. If it returns true, no vehicles will spawn for that player (useful for Cinematics or certain player states).Server Settings
Enables or disables server-side debug prints in the console.
Function used server-side to determine the vehicle type for spawning (e.g.
automobile, boat, heli). By default, it relies on the framework bridge: TS.Bridge.GetVehicleType(model).Function that checks if a given plate (and optional netId) belongs to an owned vehicle. This is used to decide whether a vehicle should be temporary or permanent.
Check at for more infos : Database DB Performance Issues
Enables or disables the auto-save feature. When enabled, vehicles are automatically saved to the database at specified intervals.
The interval (in minutes) at which vehicles are automatically saved to the database. Only applicable when
Config.Server.autoSaveActive is true.Enables or disables the time-based deletion feature. When enabled, vehicles can be automatically deleted based on their age and type.
The age (in minutes) at which temporary vehicles are automatically deleted. For example,
120 would be 2 hours. Set to false to disable deletion of temporary vehicles. Only applicable when Config.Server.timeToDeleteActive is true.The age (in minutes) at which permanent vehicles are automatically deleted. Set to
false to disable deletion of permanent vehicles. Only applicable when Config.Server.timeToDeleteActive is true.The interval (in minutes) at which the script checks for vehicles that should be deleted. Only applicable when
Config.Server.timeToDeleteActive is true.If
true, vehicles will be set to the “outside” state when they are spawned by persistence. This ensures they behave correctly in the game world.If
true, all persisted vehicles are sent to connected clients when the resource starts, so they can be managed by the client-side grid system immediately.A callback function triggered on the server immediately after a vehicle is created. Useful for custom scripts that need to modify the vehicle after spawning.
Handles server-side locking and synchronization with key systems (like
qb-vehiclekeys). It sets the isLocked state bag for synchronization.A callback function used to display notifications to players. It receives the player’s source, a message string, and an optional type (e.g., ‘success’, ‘error’).
Configuration for permission checks for various commands.
Permission check for the
/persistence reload command. By default, it uses the framework’s bridge permission system or falls back to an ACE check.Permission check for the
/bringvehicle command. By default, it uses the framework’s bridge permission system or falls back to an ACE check.Permission check for the
/setvehicleasTemp command. By default, it uses the framework’s bridge permission system or falls back to an ACE check.