Skip to main content

Vehicle & Persistence

Vehicle mod and wheel tuning persistence settings

This section

Vehicle & Persistence

Framework Save

Save vehicle mods to the framework database so garage scripts preserve modifications.

lua
Config.FrameworkSave = {
enabled = true, -- Save mods to owned_vehicles / player_vehicles
}
  • ESX: Saved to owned_vehicles.vehicle column
  • QBCore/QBox: Saved to player_vehicles.mods column
  • Non-owned vehicles: temporary mods (session only)

Wheel Tuning Persistence

Camber, offset, and width cannot be captured by GetVehicleProperties(). They are saved separately.

lua
Config.WheelTuning = {
saveToDatabase = true, -- Save to code9_wheel_tuning table
autoLoad = true, -- Auto-load when player enters vehicle
}

Saved Configurations

Players can save their mod setups with a unique shareable code.

lua
Config.SavedConfigs = {
maxPerPlayer = 20, -- Maximum saved configurations per player
}

Vehicle Settings

lua
Config.Vehicle = {
freezeVehicle = true, -- Freeze during customization
lockDoors = true, -- Lock doors during customization
disableExit = true, -- Disable vehicle exit
hidePlayer = true, -- Hide player character
allowedClasses = {-1}, -- -1 = all classes allowed
blacklistedVehicles = {}, -- e.g., {'police', 'ambulance'}
}