manniche_garage and can change before the release.Config files
| File | Side | What it holds |
|---|---|---|
config/config.lua | shared | Config: language, interaction, integrations, distances |
config/server.lua | server only | ServerConfig: fees, limits, rate limits, admin rights |
config/garages.lua | shared | Config.SeedGarages and Config.SeedImpounds |
config/hooks.lua | server | ServerHooks functions |
config/ipls.lua | shared | IPLS: base-game garage interiors for the interior editor |
config/props_allow.lua | server | Vehicle property fields the server accepts from a client |
/garageadmin menu without a restart. The values an admin saves are stored in manniche_garage_settings and are laid over the config files at start-up. Rate limits cannot be changed there.Language
Set Config.Locale in config/config.lua. The value is a key from Locales. If a text is missing in that language, the English text is used.
Config.Locale = 'en'
Locale files in locales/: ar, cn, cs, da, de, en, es, fi, fr, hu, it, ja, lt, nl, pt, ro, sv, vi, zh-tw. To add a language, add a file that sets Locales['xx'] and set Config.Locale to 'xx'.
Config (config.lua)
General
| Option | Default | What it does |
|---|---|---|
Config.Locale | 'en' | Language for all text |
Config.Framework | 'auto' | 'auto', 'esx', 'qb' or 'qbx' |
Config.AutoCreateTables | true | Run sql/install.sql on start |
Config.Debug | false | Print extra lines in the server console while setting up |
Config.ImpoundCommand | 'iv' | Command a job with impound rights uses to impound the nearest vehicle |
Config.AdminCommand | 'garageadmin' | Command that opens the admin menu |
Config.PrivateDashboardJobs | {} | Jobs that may use /privategarages. An empty list lets everyone use it |
Interaction
| Option | Default | What it does |
|---|---|---|
Config.Interaction | 'textui' | 'textui', 'target', '3dtextui' or 'radial'. A table sets it per kind with a fallback: { default = 'textui', garage = 'target', impound = 'textui' }. Unknown values give 'textui' |
Config.Target | 'auto' | Target script for 'target': 'auto' (ox_target, then qb-target), 'ox_target' or 'qb-target' |
Config.OpenStoreKey | 38 | Control used to park at the access point when a garage has "store with the key" on. The same key opens the menu on foot (38 is E) |
Config.UseDistance | 3.0 | Metres from a garage point within which the menu opens (added to its radius) |
Config.StoreDistance | 8.0 | Metres from a garage point within which a vehicle may be parked (added to its radius) |
Integrations
| Option | Default | Values |
|---|---|---|
Config.Notifications | 'ox_lib' | 'ox_lib', 'esx', 'okokNotify', 'ps-ui', 'custom'. 'custom' fires the client event manniche_garage:notifyCustom with (text, kind, title) |
Config.TextUI | 'ox_lib' | 'ox_lib', 'jg-textui', 'okokTextUI', 'ps-ui', 'esx', 'custom'. 'custom' fires manniche_garage:textUiShow with (text) and manniche_garage:textUiHide |
Config.FuelSystem | 'auto' | 'auto' (first started one), a name from bridge/fuel.lua, or 'native'. Unknown names use native. Listed: ox_fuel, LegacyFuel, ps-fuel, lj-fuel, cdn-fuel, hyon_gas_station, okokGasStation |
Config.VehicleKeys | 'auto' | 'auto', a name from bridge/keys.lua, or 'custom'. Listed: qbx_vehiclekeys, qb-vehiclekeys, jaksam-vehicles-keys, mk_vehiclekeys, qs-vehiclekeys, wasabi_carlock, cd_garage, okokGarage, t1ger_keys. The events fire in every mode, see Events |
Vehicles
| Option | Default | What it does |
|---|---|---|
Config.TypeMap | car = { 'car' }, air = { 'aircraft', 'heli', 'plane' }, sea = { 'boat' } | Which owned_vehicles.type values each garage type shows |
Config.VehicleTypes | {} | QB-Core and Qbox only. Model to type for add-on vehicles, for example { myaddonheli = 'heli' }. Types otherwise come from the shared vehicle list |
Config.FakePlates | 'auto' | Brazzers-FakePlate. 'auto' looks once at start for a fakeplate column; false ignores it |
Config.VehicleLabels | {} | Names for add-on vehicles by spawn name, for example { myaddoncar = 'My Add-on Car' } |
Config.MaxDeformation | 24 | Dents kept per vehicle when it is parked |
Config.DeformationStrength | 600 | How hard dents are pushed back in. Raise it if restored dents look too faint |
Config.TakeFromAnyGarage | false | true: a stored vehicle can be taken out of any garage of its type. false: only where it was parked |
Config.WarpIntoVehicle | true | Put the player in the driver seat when a vehicle comes out |
Vehicle pictures
| Option | Default | What it does |
|---|---|---|
Config.VehicleImages | 'https://docs.fivem.net/vehicles/%s.webp' | Picture URL. %s becomes the spawn name. false shows drawings only |
Config.VehicleImageFiles | {} | Pictures for add-on vehicles by spawn name. A vehicle without a picture shows a drawing of its type |
Server config (server.lua)
Clients never download config/server.lua.
General and admin
| Option | Default | What it does |
|---|---|---|
ServerConfig.Webhook | '' | Discord webhook for the garage log. Empty logs to the database only |
ServerConfig.AdminPrincipals | { 'group.admin' }, or { 'qbcore.admin', 'qbcore.god' } on QB-Core | ACE principals that may use the admin commands |
ServerConfig.ExportResources | {} | Allowlist of resources that may call the server exports. Empty lets every resource call |
ServerConfig.AdminMaxSpawnDistance | 150.0 | Metres a spawn point may lie from its access point |
ServerConfig.KickAfterRejects | 50 | Kick a player after this many calls turned down by a rate limit without a quiet minute in between. 0 turns it off |
ServerConfig.KeepLooksFromDatabase | true | When parking, take only condition (damage, fuel, dirt) from the client and keep mods, colours and neon from the database |
Rate limits
ServerConfig.RateLimits sets, per player and action, how many calls refill (rate) per per seconds, up to burst at once.
| Action | rate | per | burst |
|---|---|---|---|
default | 1 | 1 | 3 |
takeOut | 1 | 2 | 2 |
store | 1 | 2 | 2 |
openMenu | 2 | 1 | 4 |
impound | 1 | 3 | 2 |
admin | 5 | 1 | 10 |
trade | 1 | 1 | 4 |
track | 1 | 5 | 2 |
interior | 1 | 2 | 3 |
interiorExit | 1 | 1 | 4 |
mileage | 1 | 20 | 2 |
private | 1 | 1 | 4 |
Impound and lost vehicles
| Option | Default | What it does |
|---|---|---|
ServerConfig.RecoverFee | 500 | Cost to get back a vehicle destroyed or despawned while out. 0 is free |
ServerConfig.LostVehicles | 'impound' | After a restart, for vehicles that were out and are gone: 'impound' sends them to the impound (ImpoundFee), 'store' puts them in their garage, 'recover' leaves them out so the player pays RecoverFee |
ServerConfig.ImpoundOnLogout | true | Vehicles still out when the owner logs off are removed and impounded |
ServerConfig.ImpoundFee | 5000 | Cost to get a vehicle out of the impound when no job set a fee |
ServerConfig.ImpoundMinFee | 0 | Lowest fee an officer may enter at /iv |
ServerConfig.ImpoundMaxFee | 50000 | Highest fee at /iv |
ServerConfig.ImpoundMaxHours | 72 | Longest waiting time at /iv |
ServerConfig.ImpoundDistance | 6.0 | Metres the officer may stand from the vehicle at /iv |
ServerConfig.AutoImpound | false | Remove vehicles that have been out for AutoImpoundMinutes with no player within AutoImpoundDistance and nobody in a seat |
ServerConfig.AutoImpoundMinutes | 30 | Minutes out before auto-impound |
ServerConfig.AutoImpoundDistance | 100.0 | Metres within which a player stops auto-impound |
ServerConfig.AutoImpoundLot | false | Id of the impound lot it goes to, or false to only mark it lost (recovered for RecoverFee) |
ServerConfig.SaveDamage | true | Restore engine, body and tank health on take-out. false gives a repaired vehicle |
ServerConfig.SaveDeformation | true | Restore saved dents on take-out |
Society accounts
| Option | Default | What it does |
|---|---|---|
ServerConfig.SocietyPayout | nil | function(account, amount, plate, kind), called once when a vehicle impounded by a job is paid out. kind is 'impound' (or 'transfer'). On QB-Core and Qbox this hook is the only way to pay a society |
ServerConfig.SocietyAccounts | 'auto' | 'auto' uses esx_addonaccount (account society_<job> or the lot's society field) when it runs. false pays nobody. A function in SocietyPayout wins |
ServerConfig.TransferFeeSociety | nil | Society account that receives transfer fees. nil pays nobody |
Transfers, sharing, selling, tracking
| Option | Default | What it does |
|---|---|---|
ServerConfig.TransferFee | 250 | Cost of moving a vehicle between garages, paid after the move. 0 is free |
ServerConfig.EnableTransfers | { betweenGarages = true, betweenPlayers = true } | Which transfers are on |
ServerConfig.TransferHidePlayerNames | false | The nearby player list shows only a server id |
ServerConfig.TransferBlacklist | {} | Spawn names that cannot be transferred or sold to a player |
ServerConfig.TransferDistance | 10.0 | Metres between two players for a transfer, share or sale |
ServerConfig.EnableVehicleSharing | true | Share a vehicle with other players (they can take it out and park it) |
ServerConfig.VehicleSharingMaxPlayers | 3 | Most players per shared vehicle |
ServerConfig.EnableSell | true | Sell a vehicle to a nearby player |
ServerConfig.SellMaxPrice | 5000000 | Highest price (whole money from 1) |
ServerConfig.SellOfferSeconds | 60 | How long an offer stands |
ServerConfig.EnableTrack | true | Put a map marker where a vehicle that is out is now (not followed live) |
Mileage
| Option | Default | What it does |
|---|---|---|
ServerConfig.MileageMaxSpeedKmh | 500 | The client reports about every 30 seconds. The server accepts no more than this speed allows |
ServerConfig.MileageUnit | 'kilometers' | 'kilometers' or 'miles'. The value is always stored in km |
Private garages
| Option | Default | What it does |
|---|---|---|
ServerConfig.PrivateMaxMembers | 8 | Most members per private garage |
ServerConfig.PrivateInteriorTour | false | Show an "Interior tour" button on the sale advert. It fires the client event manniche_garage:interiorTour |
Trailers
| Option | Default | What it does |
|---|---|---|
ServerConfig.MaxTrailers | 12 | Most vehicles on a tow at once, trailers and cargo together |
ServerConfig.TrailerDriverMayStay | true | The driver may stay in the tow while it is parked with trailers |
ServerConfig.TrailerLinkDistance | 16.0 | Metres a trailer on a hitch must be from the vehicle in front |
ServerConfig.TrailerStoreWorld | false | Allow parking a trailer nobody owns that this resource did not spawn |
ServerConfig.TrailerSpacing | 9.0 | Metres between vehicles in a line when a tow comes out |
Interiors
| Option | Default | What it does |
|---|---|---|
ServerConfig.InteriorBucketBase | 1000 | First routing bucket used for visits (each visit takes its own) |
ServerConfig.InteriorInviteMs | 30000 | How long an invitation stands, in ms |
ServerConfig.InteriorGuestDistance | 5.0 | How close a guest must be to the entrance, in metres |
ServerConfig.InteriorTourMs | 60000 | How long a tour lasts, in ms |
Garages and impound lots
Config.SeedGarages and Config.SeedImpounds in config/garages.lua are copied into the database once per entry. After that the database is the source and admins change garages in game. A name that already exists is skipped.
Garage fields
| Field | What it does |
|---|---|
name, label | Unique name and shown name |
vehicleType | The garage type. The examples use 'car'; Config.TypeMap defines car, air and sea |
kind | 'public' or 'job' |
job | With kind = 'job': the job that may use it |
access | { coords = vec3(...), radius = 2.0 } |
spawns | List of vec4(x, y, z, heading) |
blip | { sprite, colour, scale } |
spawner | Job garages: spawner vehicles with model, label, liveries (first is default), extras (extra id = on or off), colours ({ primary = n, secondary = n }), platePrefix, minGrade or grades, limitScope ('garage' or 'player'), limitCount (0 is no limit), allowSetup (the player may change livery and extras first) |
Impound lot fields
| Field | What it does |
|---|---|
name, label, access, spawns, blip | Same as for a garage |
jobs | Job to lowest grade that may impound here, for example { police = 0 } |
society | Account that ServerConfig.SocietyPayout gets |
fee | Default fee an officer sees at /iv |
Hooks (hooks.lua)
Functions in config/hooks.lua run on the server after a vehicle changes hands. They run in their own thread inside pcall, so an error is printed and never stops a take-out or a store. src is the player server id, or 0 when the server did it (for example auto-impound).
| Function | data |
|---|---|
ServerHooks.OnTakeOut(src, data) | plate, garageId, netId |
ServerHooks.OnStore(src, data) | plate, garageId |
ServerHooks.OnImpound(src, data) | plate, impoundId, recordId, auto (impoundId is nil when the vehicle was only marked lost) |
ServerHooks.OnTransfer(src, data) | plate, kind, from, to, fee, price |