Documentation/General/LG Thunder Garage
LEIGONG DOCUMENTATION

LG Thunder Garage

Language ENUpdated 2026-07-31

Version: 1.2.4


Installation

Requirements

  • ox_lib
  • oxmysql
  • One supported framework:
    • ESX
    • QB-Core
    • QBox

Install Resource

Place the resource in your server resources directory:

TEXT
resources/[lg]/LG-ThunderGarage

Do not rename the resource folder.

Database

Automatic database setup is enabled by default:

LUA
-- config/advanced.lua
Config.AutoRunSQL = true

To install SQL manually, disable automatic setup:

LUA
Config.AutoRunSQL = false

Then import the correct file:

ESX

TEXT
sql/run-esx.sql

QB-Core / QBox

TEXT
sql/run-qb.sql

Database repair file:

TEXT
sql/sql_fix_columns.sql

Always back up your database before importing SQL.

Server Start Order

ESX

CFG
ensure oxmysql
ensure ox_lib
ensure es_extended
ensure LG-ThunderGarage

QB-Core

CFG
ensure oxmysql
ensure ox_lib
ensure qb-core
ensure LG-ThunderGarage

QBox

CFG
ensure oxmysql
ensure ox_lib
ensure qbx_core
ensure LG-ThunderGarage

Fuel, vehicle keys, banking and other integrations must start before LG Thunder Garage.


Config

Configuration Files

TEXT
config/core.lua
config/public_garages.lua
config/private_garages.lua
config/job_garages.lua
config/gang_garages.lua
config/impounds.lua
config/interiors.lua
config/advanced.lua
config/client.lua
config/server.lua

Framework

Open:

TEXT
config/core.lua
LUA
Config.Framework = "ESX"

Supported values:

LUA
Config.Framework = "auto"
Config.Framework = "ESX"
Config.Framework = "QBCore"
Config.Framework = "Qbox"

Using an explicit framework value is recommended.

Language and Currency

LUA
Config.Locale = "cn"
Config.NumberAndDateFormat = "zh-CN"
Config.Currency = "CNY"

English example:

LUA
Config.Locale = "en"
Config.NumberAndDateFormat = "en-US"
Config.Currency = "USD"

E-Key Interaction Without NPC

LUA
Config.UseTarget = false
Config.TargetPed = false
Config.UseRadialMenu = false
Config.DrawText = "ox_lib"

Config.OpenGarageKeyBind = 38
Config.InsertVehicleKeyBind = 38
Config.OpenImpoundKeyBind = 38
Config.ExitInteriorKeyBind = 38

Control 38 is the default FiveM E key.

Integrations

LUA
LGGarageConfig.Integrations = {
  Fuel = "ox_fuel",
  VehicleKeys = "auto",
  Notifications = "ox_lib",
  Banking = "okokBanking",
  TextUI = "ox_lib",
  Target = "ox_target",
  RadialMenu = "ox_lib",
  Mechanic = "lg-mechanic",
  Mileage = "lg-vehiclemileage",
  Dealerships = "lg-dealerships"
}

Change integrations to match the resources installed on your server.

Vehicle Images

LUA
Config.Interface.EnableVehicleImages = true
Config.Interface.VehicleImageSource = "cfx-first"
Config.Interface.VehicleImageFormat = "png"

Available image source modes:

TEXT
cfx-first
hybrid
local
cfx

Custom vehicle images must use the lowercase vehicle spawn name:

TEXT
vehicle_images/sultanrs.png
vehicle_images/police3.png
vehicle_images/customvehicle.png

Vehicle Storage

LUA
Config.SaveVehicleDamage = true
Config.AdvancedVehicleDamage = true
Config.SaveVehiclePropsOnInsert = true
Config.CheckVehicleModel = true
Config.SpawnVehiclesWithServerSetter = false
Config.DoNotSpawnInsideVehicle = false

Recommended:

LUA
Config.SpawnVehiclesWithServerSetter = false

Vehicle Transfers

LUA
Config.EnableTransfers = {
  betweenGarages = true,
  betweenPlayers = true
}

Config.GarageVehicleTransferCost = 1500
Config.DisableTransfersToUnregisteredGarages = false

Blocked player-transfer vehicles can be configured in:

TEXT
config/advanced.lua
LUA
Config.PlayerTransferBlacklist = {
  "police",
  "ambulance"
}

Public Garage

Public garages are configured in:

TEXT
config/public_garages.lua

Example:

LUA
Config.GarageLocations["Legion Square"] = {
  coords = vector3(215.09, -805.17, 30.81),

  spawn = {
    vector4(216.84, -802.02, 30.78, 69.82),
    vector4(218.09, -799.42, 30.76, 66.17)
  },

  distance = 18,
  type = "car",

  interior = {
    enabled = true,
    template = "standard"
  },

  hideBlip = false,

  blip = {
    id = 357,
    color = 0,
    scale = 0.7
  },

  hideMarkers = false,

  markers = {
    id = 21,
    size = {
      x = 0.42,
      y = 0.42,
      z = 0.42
    },
    color = {
      r = 216,
      g = 166,
      b = 42,
      a = 170
    },
    bobUpAndDown = 0,
    faceCamera = 0,
    rotate = 1,
    drawOnEnts = 0
  }
}

Supported garage types:

LUA
type = "car"
type = "sea"
type = "air"

Every garage name must be unique.

Garage Interiors

Global setting:

LUA
Config.GarageEnableInteriors = true
Config.GarageDefaultInteriorEnabled = true

Enable an interior for one garage:

LUA
interior = {
  enabled = true,
  template = "standard"
}

Disable it:

LUA
interior = {
  enabled = false,
  template = "standard"
}

Interior coordinates are configured in:

TEXT
config/interiors.lua
LUA
Config.GarageInteriorEntrance = vector4(
  227.96,
  -1003.06,
  -99.0,
  0.0
)

Impound

Impound settings are located in:

TEXT
config/impounds.lua
LUA
Config.ImpoundCommand = "iv"
Config.ImpoundFeesSocietyFund = false
Config.ImpoundShowBlips = true

Config.ImpoundTimeOptions = {
  0,
  1,
  4,
  12,
  24,
  72,
  168
}

Vehicle visibility and retrieval:

LUA
Config.ImpoundShowRestrictedToOwner = true
Config.ImpoundDefaultRetrievable = true
Config.ImpoundJobViewAllLocations = true
Config.ImpoundOwnerViewAllLocations = true

Impound location example:

LUA
Config.ImpoundLocations["Impound A"] = {
  coords = vector3(404.99, -1626.91, 29.29),

  spawn = {
    vector4(409.87, -1647.58, 28.88, 228.80)
  },

  distance = 5,
  type = "car",

  job = {
    "police"
  },

  hideBlip = false,

  blip = {
    id = 68,
    color = 0,
    scale = 0.7
  },

  hideMarkers = false
}

Debug

LUA
-- config/advanced.lua
Config.Debug = false

Enable temporarily when diagnosing a problem:

LUA
Config.Debug = true

Keep debug mode disabled on production servers.


Exports

Get Current Vehicle Stats

Client export:

LUA
local stats = exports["LG-ThunderGarage"]:GetCurrentVehicleStats()

Returns nil when the player is not inside a vehicle.

Example result:

LUA
{
  engine = 1000.0,
  body = 1000.0,
  fuel = 75.0,

  enginePercent = 100.0,
  bodyPercent = 100.0,
  fuelPercent = 75.0,

  engineDisplay = "100.0%",
  bodyDisplay = "100.0%",
  fuelDisplay = "75.0%"
}

Example:

LUA
local stats = exports["LG-ThunderGarage"]:GetCurrentVehicleStats()

if stats then
  print(("Fuel: %s"):format(stats.fuelDisplay))
end

Get All Garages

Server export:

LUA
local garages = exports["LG-ThunderGarage"]:getAllGarages()

Example:

LUA
for _, garage in ipairs(garages) do
  print(garage.name, garage.type)
end

Each garage can include:

LUA
{
  name = "Legion Square",
  label = "Legion Square",
  type = "car",
  takeVehicle = vector3(...),
  putVehicle = vector3(...),
  spawnPoint = {
    vector4(...)
  },
  showBlip = true,
  blipName = "Legion Square",
  blipNumber = 357,
  blipColor = 0,
  vehicle = "car"
}

Impound Vehicle

Server export:

LUA
local success = exports["LG-ThunderGarage"]:impoundVehicle(
  source,
  plate,
  impoundId,
  reason,
  retrievable,
  retrievalDate,
  retrievalCost,
  vehicleProps,
  fuel,
  engine,
  body,
  damage,
  retrievalTimestamp
)

Parameters:

TEXT
source              Player server ID
plate               Vehicle plate
impoundId           Configured impound location name
reason              Impound reason
retrievable         Whether the owner can retrieve the vehicle
retrievalDate       Display retrieval date/time
retrievalCost       Retrieval price
vehicleProps        Vehicle property table
fuel                Fuel level from 0 to 100
engine              Engine health
body                Body health
damage              Vehicle damage table
retrievalTimestamp  Unix timestamp when retrieval becomes available

Example:

LUA
local vehicle = GetVehiclePedIsIn(GetPlayerPed(source), false)

if vehicle == 0 then
  return
end

local plate = GetVehicleNumberPlateText(vehicle)
local props = {}
local damage = {}

local success = exports["LG-ThunderGarage"]:impoundVehicle(
  source,
  plate,
  "Impound A",
  "Illegal parking",
  true,
  os.date("%Y-%m-%d %H:%M:%S", os.time() + 3600),
  1500,
  props,
  75.0,
  900.0,
  850.0,
  damage,
  os.time() + 3600
)

if not success then
  print("Failed to impound vehicle")
end

Validate all export parameters server-side before calling the impound export.

Support Center

Include your framework, complete console error, configuration section, and reproduction steps.

Support