zephyr_garagesOverview

zephyr_garages

zephyr_garages is a full-featured, multi-garage vehicle management resource for FiveM. It handles both personal vehicle storage and job-based vehicle spawners in a single unified system, with a React NUI interface, vehicle preview cameras, folder organisation, towing, and runtime-configurable garages.

Version2.0.0
AuthorZephyr Development
FrameworkQBX / QBCore
UIReact + Vite (lation_ui)

Features

FeatureDescription
Personal GaragesPlayers access their own owned vehicles, filtered by type (car, air, sea, or all). Vehicles track state: GARAGED, OUT, or IMPOUNDED.
Vehicle SpawnerGarages can be configured as spawners — a grade-gated list of job vehicles (e.g. police fleet). Spawned vehicles are not persisted; they are generated fresh each time with preset plate, livery, extras, and full mods.
Depot / ImpoundGarages with type = 'depot' hold impounded vehicles. Players pay a release fee (configurable as a % of vehicle value) to retrieve them.
Vehicle PreviewBefore spawning or pulling out a vehicle, players can enter a 3D preview mode with an orbiting camera. The camera supports zoom, pitch, and free rotation. The preview times out after a configurable duration.
FavouritesPlayers can mark vehicles as favourites. Favourited vehicles appear first in the list.
Player FoldersPlayers can create up to 20 custom folders to organise their vehicles. Folders are named, reordered, and persisted per character.
Division / Job FoldersConfig-defined vehicle folders (e.g. SWAT, CID, HWY) are displayed only to officers assigned to that division via statebags. Division access is checked against zephyr_police or the zp_division statebag.
TowingPlayers can tow a vehicle to a different garage from the UI. A cooldown (default 120 s) and optional fee (default $3,000) apply. Towed vehicles are locked during the cooldown period.
Vehicle TransferPlayers can transfer ownership of a vehicle to another nearby player (configurable radius). A blacklist prevents transfers of high-value/exotic vehicles.
Boot ContentsView the ox_inventory boot/trunk contents of a garaged vehicle directly from the garage UI without spawning it.
Access ControlGarages support job/group restrictions, grade requirements, and runtime-injectable allowedIdentifiers for fine-grained access.
Blips & MarkersEach access point can define a map blip and a ground marker drawn at the interaction zone.
Runtime RegistrationOther resources can register or update garages at runtime via the RegisterGarage export without restarting.

Dependencies

ResourceRequiredNotes
ox_lib✅ YesCallbacks, locale, progress bars
oxmysql✅ YesVehicle and folder persistence
qbx_core✅ YesPlayer data, vehicle records
qbx_vehicles✅ YesVehicle catalog (brand, name, price)
lation_ui✅ YesNUI rendering layer

Configuration

Shared (config/shared.lua)

OptionTypeDescription
towCooldownnumberSeconds between tow actions per player (default: 120)
towCostnumberMoney deducted per tow action (default: 3000)
transferSearchRadiusnumberMax distance in metres to find a transfer target player (default: 50)
vehicleFolderstableDivision/job-based folder definitions — see below
vehicleFolderOtherLabelstringLabel for vehicles not matching any folder (default: "Other")
transferBlacklisttableModel names that cannot be transferred between players

Vehicle folder definition:

vehicleFolders = {
    { id = 'swat', label = 'SWAT', jobs = { 'police' }, models = { 'bearcatrbstairs', 'pvalk' } },
    { id = 'hwy',  label = 'HWY',  jobs = { 'police' }, models = { 'c3bike', 'ppgjv' } },
}

Client (config/client.lua)

OptionTypeDescription
enableClientbooleanMaster switch — set to false to disable all client-side logic
engineOnbooleanWhether the engine starts when a vehicle is spawned
previewDurationnumberPreview timeout in milliseconds (default: 30000)
previewCam.radiusnumberInitial camera orbit radius
previewCam.rotateSpeednumberCamera rotation speed (degrees/sec)

Server (config/server.lua)

OptionTypeDescription
autoRespawnbooleanAutomatically respawn vehicles that are still OUT when the server restarts
warpInVehiclebooleanWarp the player into the spawned vehicle
doorsLockedbooleanLock vehicle doors on spawn
distanceChecknumberDistance in metres used to check for blocking vehicles at spawn points
calculateImpoundFeefunctionReturns the depot release fee for a given vehicle ID and model name
garagestableGarage definitions — see below

Garage definition

garages = {
    downtown = {
        label        = 'Downtown',
        vehicleType  = VehicleType.CAR,   -- CAR | AIR | SEA | ALL
        -- type      = GarageType.DEPOT,  -- omit for normal garage; set to DEPOT for impound
        accessPoints = {
            {
                blip  = { name = 'Public Parking', sprite = 357, color = 44 },
                coords = vec4(216.23, -809.93, 30.73, 164.08),
                spawn  = vec4(228.87, -801.30, 30.65, 164.08),
                -- spawn can also be a table of vec4 for multiple candidates
            },
        },
    },
    -- Job spawner example:
    mrpd = {
        label             = 'MRPD',
        vehicleType       = VehicleType.CAR,
        groups            = 'police',       -- job restriction
        spawnerVehicles   = { 'poracle', 'ps790', 'pzenith' },
        spawnerVehicleConfigs = {
            poracle = { minJobGrade = 1, livery = 1, extras = { 1, 2, 3 } },
        },
        accessPoints = { ... },
    },
}