Configuration

Edit config.lua.

Core settings

-- Garage provider: 'cd', 'qb', or 'none'
Config.GarageProvider = 'qb'

-- Player vehicles owner column: 'citizenid', 'owner', 'license', 'identifier'
-- (Used when the UI loads "My Vehicles" from your player_vehicles table.)
Config.PlayerVehiclesOwnerColumn = 'license'

Adding / editing garages

Each entry in Config.JobGarages defines one job garage target + spawn point.

Config.JobGarages = {
  ['police_main'] = {
    label = 'MRPD Fleet',
    job = 'police',

    -- Minimum grade required to OPEN the garage target (qb-target interaction)
    minGrade = 0,

    -- The prop spawned as the qb-target entity
    targetProp = 'prop_parkingpay',
    targetCoords = vector4(458.61, -1023.36, 28.33, 268.63),

    -- Where vehicles spawn when taken out
    spawnCoords = vector4(410.12, -971.35, 25.45, 180.0),

    -- UI accent color for this garage
    themeColor = '#53a2ff',

    -- Optional: manager grade threshold (defaults to 4)
    manageGrade = 4,

    -- Optional defaults used when the permissions row does not exist yet
    defaultMinGradeUse = 0,
  }
}

How it works (quick)

  • Open garage: interact with the spawned prop (qb-target) → NUI opens.

  • Take a vehicle: selecting a fleet vehicle marks it as out in the DB, then spawns it client-side.

  • Store a vehicle: “Store Job Vehicle” only works for the plate currently taken out via this UI.

  • Add fleet vehicles (manager): in the Manage Fleet tab, load your owned vehicles and add them into the fleet.

    • The script checks ownership/keys depending on Config.GarageProvider.

  • Assignments (manager): reserve a vehicle to a specific employee (online server ID) or to a minimum grade.

  • Logs: the last ~50 actions per garage are shown in the Logs tab.

Images & sounds

Vehicle images

  • Place vehicle images at:

    • html/images/vehicles/<model>.webp

  • The UI will also try .png, .jpg, .jpeg if .webp is missing.

UI sounds (optional)

html/index.html references:

  • html/sounds/take.wav

  • html/sounds/store.wav

  • html/sounds/error.wav

The folder currently only contains a placeholder, so add those .wav files if you want sounds.

Last updated