Configuration
This section explains each setting in the config.lua
file for your garage script.

General Settings
Config.SQL
: SQL script to use, e.g.oxmysql
.Config.ServeName
: Your server or script name.Config.Framework
: Framework in use (qb
,oldqb
,esx
,oldesx
).Config.vehicleSQL
: Table for owned vehicles, changes based on framework.
Features
Config.VisuallyDamageCars
: Iftrue
, vehicles spawn with visual damage.Config.SharedGarages
: Iftrue
, all players can use all garages.Config.ClassSystem
: Enables vehicle class restrictions.Config.Warp
: Puts the player in the vehicle automatically when it spawns.Config.AllowParkingAnyonesVehicle
: Allows storing any vehicle, not just owned ones.Config.AutoRespawn
: Automatically stores all vehicles in garages on server restart.Config.getAllVehicles
: Shows all owned vehicles or just the ones in the garage.
Vehicle Classes
Config.VehicleClasses
: Defines which vehicle class IDs belong to which type, such as cars, boats, aircraft, and emergency vehicles.
Garage Marker
Config.GarageMarker
: Controls the garage marker's color, size, type, and visibility distance.

Garage Configuration
This section defines all garage locations available in the server.
Each garage includes:
label
: Display name of the garage.takeVehicle
: Location where players retrieve vehicles.spawnPoint
: Location(s) where vehicles spawn.showcar
(optional): Position to showcase the vehicle.camera
(optional): Coordinates and angles for garage preview camera.showBlip
: Whether the garage appears on the map.blipName
,blipNumber
,blipColor
: Controls blip display settings.type
: Garage type (public
,job
,gang
,depot
).category
: Allowed vehicle classes (e.g.,Config.VehicleClasses['car']
).

Fuel & Vehicle Key Integration
These functions allow your garage system to work with multiple popular fuel and key systems automatically.
Config.setFuel(vehicle, fuel_level)
Sets the vehicle’s fuel level. Compatible with:
LegacyFuel
cdn-fuel
Default GTA fuel system
Config.getFuel(vehicle)
Retrieves the vehicle’s fuel level, depending on the fuel resource currently running.
Config.GiveVehicleKey(plate, vehicle)
Grants keys for a vehicle using the detected key system:
cd_garage
qs-vehiclekeys
wasabi-carlock
qb-vehiclekeys
Config.RemoveVehicleKey(plate, vehicle, model)
Removes or reassigns vehicle keys using the same supported systems.
cd_garage
qs-vehiclekeys
wasabi-carlock
qb-vehiclekeys
Last updated