Skip to main content
The configuration file is located at 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 by ts-lib. You can set them in ts-lib/shared/config.lua.

Bridge Settings

Config.Bridge.VehicleDeformation
boolean
default:"false"
If set to true, the script will sync visual vehicle deformation using the VehicleDeformation plugin. More info here.

Global Settings

Config.Global.trailerActive
boolean
default:"true"
When enabled, any trailer attached to a vehicle will also be saved and restored when the main vehicle spawns.
Config.Global.disableTemporaryVehicles
boolean
default:"false"
When enabled, all vehicles will be permanent. This means that vehicles will not be deleted after a reboot or script restart.

Client Settings

Config.Client.debug
boolean
default:"false"
Enables or disables client-side debug prints in the F8 console.
Config.Client.fuel.Get
function
Function used to retrieve the current fuel level of a vehicle. By default, it uses the native GetVehicleFuelLevel.
Config.Client.fuel.set
function
Function called to apply fuel level to a vehicle. Custom fuel scripts (like LegacyFuel) can be integrated here.
Config.Client.spawnRadius
number
default:"200"
The distance (in units) at which a persisted vehicle will start to spawn when a player approaches. If the vehicle was not already spawned.
Config.Client.spawnTimeout
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.
Config.Client.netWorkControlTimeout
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.
Config.Client.propsApplyTryCount
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.
Config.Client.setVehicleDoorStatusLocked
function
Handles local door locking. It receives the raw GTA lock status (1 = unlocked, 2 = locked, etc.). See more at FiveM Natives.
Config.Client.DisableSpawning
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

Config.Server.debug
boolean
Enables or disables server-side debug prints in the console.
Config.Server.getVehicleType
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: TS.Bridge.GetVehicleType(model).
Config.Server.IsVehicleOwned
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.
Config.Server.realTimeDBSync
boolean
Important Performance Note:
  • true: Saves every change to the database immediately. High data safety but high resource usage.
  • false: (Recommended) Syncs data in memory and relies on auto-save intervals. Much better for server performance.
Check at for more infos : Database DB Performance Issues
Config.Server.autoSaveActive
boolean
default:"true"
Enables or disables the auto-save feature. When enabled, vehicles are automatically saved to the database at specified intervals.
Config.Server.autoSaveInterval
number
default:"5"
The interval (in minutes) at which vehicles are automatically saved to the database. Only applicable when Config.Server.autoSaveActive is true.
Config.Server.timeToDeleteActive
boolean
default:"true"
Enables or disables the time-based deletion feature. When enabled, vehicles can be automatically deleted based on their age and type.
Config.Server.timeToDeleteTemp
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.
Config.Server.timeToDeletePerm
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.
Config.Server.timeToDeleteCheckInterval
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.
Config.Server.setVehicleOutsideStateOnStart
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.
Config.Server.onRessourceStart.loadVehiclesToClients
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.
Config.Server.afterSpawn
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.
Config.Server.setVehicleDoorStatusLocked
function
Handles server-side locking and synchronization with key systems (like qb-vehiclekeys). It sets the isLocked state bag for synchronization.
Config.Server.notifyPlayer
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’).
Config.Server.permissions
object
Configuration for permission checks for various commands.
reload
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.
bringVehicle
function
Permission check for the /bringvehicle command. By default, it uses the framework’s bridge permission system or falls back to an ACE check.
setVehicleTemp
function
Permission check for the /setvehicleasTemp command. By default, it uses the framework’s bridge permission system or falls back to an ACE check.
Last modified on March 11, 2026