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
boolean
default:"false"
If set to
true, the script will sync visual vehicle deformation using the VehicleDeformation plugin. More info here.Global Settings
boolean
default:"true"
When enabled, any trailer attached to a vehicle will also be saved and restored when the main vehicle spawns.
boolean
default:"false"
When enabled, all vehicle will be permanent. This means that vehicles will not be deleted after a reboot or script restart.
Client Settings
boolean
default:"true"
Enables or disables client-side debug prints in the F8 console.
function
Function used to retrieve the current fuel level of a vehicle. By default, it uses the native
GetVehicleFuelLevel.function
Function called to apply fuel level to a vehicle. Custom fuel scripts (like LegacyFuel) can be integrated here.
number
default:"200.0"
The distance (in units) at which a persisted vehicle will start to spawn when a player approaches. If the vehicle was not already spawned.
number
default:"100"
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.
number
default:"100"
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
default:"1"
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.
function
Handles local door locking. It receives the raw GTA lock status (1 = unlocked, 2 = locked, etc.). See more at FiveM Natives.
function
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
boolean
default:"true"
Enables or disables server-side debug prints in the console.
function
Function used server-side to determine the vehicle type for spawning (e.g.
automobile, boat, heli). By default, it relies on the framework bridge: Bridge.Framework.Server.Functions.GetVehicleType(model).function
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. Uses the garage bridge from
ts-lib.function
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.
boolean
default:"true"
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.boolean
default:"false"
Check at for more infos : Database DB Performance Issues
boolean
default:"true"
Enables or disables the auto-save feature. When enabled, vehicles are automatically saved to the database at specified intervals.
number
default:"5"
The interval (in minutes) at which vehicles are automatically saved to the database. Only applicable when
Config.Server.autoSaveActive is true.boolean
default:"true"
Enables or disables the time-based deletion feature. When enabled, vehicles can be automatically deleted based on their age and type.
number
default:"2"
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.number
default:"false"
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.number
default:"5"
The interval (in minutes) at which the script checks for vehicles that should be deleted. Only applicable when
Config.Server.timeToDeleteActive is true.boolean
default:"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.function
Handles server-side locking and synchronization with key systems (like
qb-vehiclekeys). It sets the isLocked state bag for synchronization and triggers the client bridge event.function
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’).
object
Configuration for permission checks for various commands.
function
Permission check for the
/persistence reload command. By default, it uses the framework’s bridge permission system or falls back to an ACE check.function
Permission check for the
/bringvehicle command. By default, it uses the framework’s bridge permission system or falls back to an ACE check.function
Permission check for the
/setvehicleasTemp command. By default, it uses the framework’s bridge permission system or falls back to an ACE check.