Skip to content

Configuration

Every option of Cuxial Garages explained: main config, keys, impound, rentals, vehicle cleanup and markers.

The options are split in six files: shared/config.lua for the core, and one file per system in data/. Garages, depots, job fleets and rental points are not in any file: they are created in game from the admin panel. Restart the resource after changing a file.

FileCovers
shared/config.luaPermissions, payments, transfers, blips, interface
data/keys.luaVehicle keys, theft and police alerts
data/impound.luaImpound jobs, default fee and command
data/rental.luaRental contracts, late fees, warnings
data/carwipe.luaVehicle cleanup
data/zones.luaInteraction distances and the marker

Main config · shared/config.lua ​

General ​

OptionTypeDefaultWhat it does
debugbooleanfalsePrints traces to the console. Also enabled by setting the convar cuxial_garages_debug to 1.
admin.permissionstring'admin'Permission checked through your framework to open the admin panel and use its actions. /adminkey also needs the ACE group group.<permission>.
languagestring'es'Language of the interface: 'es' or 'en'. Notifications and prompts follow the convar ox:locale instead.
accentColorstringconfigurableAccent colour of the interface. Accepts RRGGBB or the short RGB, with or without #, and the 8-digit AARRGGBB form, where the first two digits are ignored.
externalGaragesbooleantruetrue lets another resource open house garages through the OpenGarage and StoreVehicle exports. Set it to false if no resource uses them: the request comes from the client.
fallbackGaragestring''Id of a public garage that receives the vehicles whose saved garage no longer exists. '' = none.
normalizeStatesOnStartbooleanfalsetrue sets every vehicle with an unknown state to stored when the resource starts. Impounded vehicles are kept. Useful only on the first start after moving from another garage resource.
vehicleStatetableOUT = 0, STORED = 1, IMPOUND = 2Values written to the state column of the vehicle table. Do not change them.
fuelExemptClassestable[14] = trueGTA vehicle classes that are always delivered with a full tank. 14 = boats.

Blips · blips ​

OptionTypeDefaultWhat it does
garagesbooleantruefalse hides the blips of every garage and depot.
rentalbooleantruefalse hides the blips of the rental points.

The look of each blip comes from two tables:

OptionWhat it does
categoryBlipsSprite and scale by the first category of the access point: car, motorcycle, air, sea. Checked first.
defaultBlipsSprite, colour and scale by garage type: public, house, job, gang, depot. Used only when the category has no entry in categoryBlips.

Each entry accepts sprite, color and scale. A missing color is 3.

Capacity · capacity ​

OptionTypeDefaultWhat it does
enabledbooleanfalsefalse = every garage is unlimited. true applies the limit each garage has in the admin panel; garages with no limit stay unlimited.

The limit is per player: how many vehicles one person can keep in that garage. Vehicles currently outside still count. Staff actions from the admin panel ignore it.

Payments · payment and recover ​

OptionTypeDefaultWhat it does
payment.accountstring'bank'Account charged for transfers, recoveries, impound fees and rentals. Rental deposits are refunded to it.
payment.allowCashFallbackbooleantruetrue charges cash when the account does not cover the amount. false rejects the payment.
recover.pricenumber1000Price of recovering a vehicle that was left outside. 0 = free.

Transfers · transfer ​

OptionTypeDefaultWhat it does
maxDistancenumber10.0Metres within which another player can receive a vehicle or be asked to pay an impound fee.
allowPlayerbooleantruefalse disables transferring vehicles to other players on every garage. With true, each garage can still turn it off in the panel.

The receiving player gets a prompt and must accept. A vehicle with pending finance cannot be transferred to another player. The price of moving a vehicle between garages is set per garage in the panel.

Vehicle options ​

OptionTypeDefaultWhat it does
cinematic.enterbooleantruetrue previews the selected vehicle on its parking spot and, when an owned vehicle is taken out, the character walks to it and gets in with a follow camera. false delivers the vehicle directly, with no preview.
nickname.enabledbooleantruefalse disables saving vehicle nicknames.
nickname.maxLengthnumber24Maximum characters of a nickname. Do not go above 24.
forceBaseLivery.enabledbooleanfalsetrue forces the base livery on the fleet vehicles of the jobs listed below.
forceBaseLivery.jobstableexample jobsJobs affected, as jobname = true. Replace the examples with your own.

Integrations ​

OptionTypeDefaultWhat it does
finance.enabledbooleanfalseShows the pending instalments of financed vehicles and lets the owner pay from the garage. Only active while the resource below is running.
finance.resourcestring'jg-dealerships'Resource that provides the finance data.
speakers.enabledbooleanfalseTells the speaker resource that an owned vehicle was taken out, so it restores its speakers. Only active while the resource below is running.
speakers.resourcestring'rahe-speakers'Resource to notify.

Vehicle keys · data/keys.lua ​

Each key is an inventory item that carries a plate. Whoever holds it can lock, unlock and start that vehicle.

General ​

OptionTypeDefaultWhat it does
enabledbooleantruefalse turns the whole key system off: no keys, no lock or engine binds, no theft, no key exports. Use it only if another resource handles keys.
itemstring'vehiclekeys'Inventory item used as the key.
lockDistancenumber8.0Metres from which a vehicle can be locked or unlocked.
giveOnTakeoutbooleantruetrue gives the key when the owner takes the vehicle out of a garage.
removeOnStorebooleantruetrue removes the key when the vehicle is stored.
getKeysWhenEngineRunningbooleanfalsetrue gives the key to whoever gets into the driver seat of a vehicle with the engine running, when that vehicle has no owner.
lockStatenumber2GTA door lock state applied when locking. 2 = locked. Any state above 1 counts as locked.
immuneVehiclesstring[]example modelModels that cannot be searched for keys.
noLockVehiclesstring[]{}Models that cannot be locked. The lock key always leaves them open.
ignoreBicyclesbooleantruetrue treats bicycles like noLockVehicles and keeps them out of the key search.

Binds and commands ​

OptionTypeDefaultWhat it does
keybinds.toggleLocksstring'L'Default key to lock or unlock the nearest vehicle.
keybinds.toggleEnginestring'G'Default key to turn the engine on or off from the driver seat.
keybinds.searchKeysstring'H'Default key to search for keys in a vehicle you have no key for.
commands.giveKeystring'givekey'Name of the command that hands your key to another player. false removes the command.
commands.adminKeystring'adminkey'Name of the staff command that creates a key. false removes the command.

These keys are only the defaults. Each player can rebind them in the GTA key settings.

Shared job keys · sharedKeys ​

OptionTypeDefaultWhat it does
enabledbooleantruefalse disables shared keys.
jobstableexample jobsPer job: vehicles is the list of models every member can use without a personal key, and requireOnduty = true limits it to members on duty.

The jobs and models in the file are examples. Replace them with your own.

Theft ​

OptionTypeDefaultWhat it does
hotwire.enabledbooleantrueLets a player in the driver seat without a key search the vehicle with the search key.
hotwire.minTime / maxTimenumber20000 / 40000Shortest and longest duration of the search, in milliseconds.
hotwire.chancenumber0.50Chance, from 0 to 1, that the search starts the engine. 0.0 disables the search.
hotwire.keysChancenumber0.10Chance of also finding the key, on a successful search. Never for a vehicle that has an owner.
hotwire.timeBetweennumber5000Milliseconds before the player can search again.
lockpick.normal.itemstring'lockpick'Item of the basic lockpick.
lockpick.normal.breakChancenumber0.4Chance, from 0 to 1, that the lockpick breaks on each use.
lockpick.advanced.itemstring'advancedlockpick'Item of the advanced lockpick. Its skill check has three steps instead of four.
lockpick.advanced.breakChancenumber0.0Chance that the advanced lockpick breaks.
carjack.enabledbooleanfalsetrue lets players rob a vehicle driven by an NPC by aiming a weapon at the driver.
carjack.timenumber7000Duration of the robbery, in milliseconds.
carjack.cooldownnumber10000Milliseconds between attempts.
carjack.chanceByWeaponGrouptableby weapon groupChance of success, from 0 to 1, for each weapon group. A group that is not listed always fails.
carjack.noWeaponsstring[]melee and throwablesWeapons that cannot be used for a carjack.

Police alerts · dispatch ​

OptionTypeDefaultWhat it does
enabledbooleantruefalse sends no alerts.
resourcestring'cuxial_police'Resource that receives the alert. '' disables it. No alert is sent while that resource is not running.
chancenumber0.75Chance of an alert during the day, from 0 to 1.
nightChancenumber0.25Chance of an alert during the night.
nightStartHournumber18Hour at which the night starts. Uses the real clock of the server machine, not the in-game time.
nightDurationnumber6Hours the night lasts.
cooldownnumber10000Milliseconds before the same player can trigger another alert.

Alerts are sent on a successful lockpick, a successful search and a successful carjack. sounds and animations set the sounds, animations and props of the key; they work as delivered.

Impound · data/impound.lua ​

OptionTypeDefaultWhat it does
jobsstring[]example jobsJobs allowed to impound with the command. They also get access to every depot that has no job list of its own in the panel.
defaultPricenumber500Fee suggested in the impound form, and the one used when no fee is given.
commandstring'impound'Name of the impound command.
maxDistancenumber5.0Metres within which the command finds the nearest vehicle.

How an impound works:

  • The officer stands next to the vehicle and uses the command. The form asks for the fee, the reason, the depot and whether the owner can retrieve the vehicle alone.
  • A vehicle with no owner is simply removed.
  • An occupied vehicle cannot be impounded.
  • At the depot, the owner pays the fee and drives away or sends the vehicle to a public garage. If the officer blocked self-retrieval, the owner cannot take it back alone: a job with access to the depot has to release it.
  • An authorized job can release a vehicle and ask a nearby player to pay. That player gets a prompt and must accept.

Rentals · data/rental.lua ​

Rental points, their catalogue and their prices are created in the admin panel. This file sets the rules shared by all of them.

General ​

OptionTypeDefaultWhat it does
enabledbooleantruefalse turns rentals off.
ticketItemstring'rentalticket'Inventory item that represents the contract. Using it opens the receipt while the rental is active.
giveTicketItembooleantruefalse rents without handing out the item. Contracts are then checked at the rental point.
platePrefixstring'RENT'Prefix of the plate of rented vehicles, up to 4 characters, followed by 4 digits.
maxActivePerPlayernumber2Active rentals a player can have at once. 0 = no limit.
interactDistancenumber8.0Metres the server accepts between the player and the point to rent or return.
markerDistancenumber16.0Metres at which the marker appears.
openRangenumber1.6Metres at which a player on foot can open the point.
returnRangenumber5.0Metres at which a player driving a rental can return it.
sweepExpressionstring'* * * * *'How often active contracts are checked, as a cron expression. Every minute by default. A longer interval delays warnings by up to that interval.
license.resourcestring'cuxial_license'Resource that provides licences. While it is not running, offers that require a licence are locked for everyone.

Late returns · overdue, decay, condition ​

OptionTypeDefaultWhat it does
overdue.graceSecondsnumber300Seconds after the end of the contract with no late fee.
overdue.feePerHournumber250Late fee per hour or part of an hour. Taken from the deposit, never more than the deposit.
overdue.forfeitAfternumber3600Seconds of delay after which the vehicle is removed and the rest of the deposit is lost.
decay.enabledbooleantruetrue damages the engine of an overdue rental while someone drives it.
decay.tickMsnumber2000Milliseconds between each loss of engine health.
decay.stagestable3 stagesEach stage has after (seconds since the contract ended), engineLoss (engine health lost per tick, out of 1000), fire = true to kill the engine and notify (locale key of the message shown when the stage starts).
condition.minBodyHealthnumber700.0Body health, out of 1000, below which the vehicle counts as damaged on return.
condition.damageFeenumber1500Amount taken from the deposit for a damaged vehicle.

If you add a stage with a new notify key, add the same key to locales/en.json and locales/es.json. A stage with no notify starts silently.

Warnings · warnings ​

OptionTypeDefaultWhat it does
enabledbooleantruefalse sends no warnings.
beforeMinutesnumber[]{ 30, 10, 0 }Minutes before the end at which a warning is sent. 0 = when the contract ends. Do not use steps shorter than the interval of sweepExpression.
allowExtendFromMailbooleantruetrue adds a button to the mail that extends the contract by one hour, at the hourly price.
senderstringconfigurableName shown as the sender of the mail.

Warnings are sent as mail when lb-phone is running and the player has a phone equipped. Otherwise they appear as a notification on screen.

New point defaults · defaults and blips ​

OptionTypeDefaultWhat it does
defaults.presetsnumber[]{ 1, 2, 4, 8, 24 }Duration buttons, in hours, of a new rental point.
defaults.maxHoursnumber24Longest rental of a new point, in hours.
defaults.depositnumber2000Deposit suggested for a new point.
blipstableby classBlip (sprite, color, scale) for each class of point: ground, air, sea, mixed.

Vehicle cleanup · data/carwipe.lua ​

OptionTypeDefaultWhat it does
enabledbooleantruefalse removes the cleanup, its commands and its exports.
commandstring'carwipe'Name of the command that starts a cleanup.
cancelCommandstring'cancelwipe'Name of the command that cancels it.
adminAcestring'group.admin'ACE group allowed to use both commands.
countdownnumber60Seconds of warning when the command is used without a number.
returnOwnedToGaragebooleantruetrue sends abandoned owned vehicles back to their garage. false leaves owned vehicles untouched.
protectNearPlayersnumber30.0Owned vehicles with a player within this many metres are not touched.
deleteNPCVehiclesbooleantruetrue removes vehicles with no owner. false leaves them.
occupiedRadiusnumber5.0Radius, in metres, used by the server pass to treat a vehicle with no owner as in use.
auto.enabledbooleanfalsetrue runs the cleanup on a schedule.
auto.expressionstring'0 */3 * * *'Schedule as a cron expression: minute, hour, day, month, weekday.
auto.countdownnumber120Seconds of warning before a scheduled cleanup.
textstablecountdown textsTexts shown in the countdown, edited in this file. urgentThreshold is the number of seconds from which the counter turns urgent.
protectedZonestableexample zonesZones where no vehicle is ever removed. Replace the examples with your own.

Each protected zone has a type and a name:

TypeFields
'sphere'coords, radius
'box'coords, size, rotation
'poly'points, minZ, maxZ

A cleanup treats job fleet vehicles and rentals as vehicles with no owner. To keep them, add the places where they are parked to protectedZones or set deleteNPCVehicles = false.

Interaction and marker · data/zones.lua ​

OptionTypeDefaultWhat it does
interactDistancenumber8.0Metres the server accepts between the player and the access point to store, take out or return.
markerDistancenumber16.0Metres at which the marker of a garage appears.
openRangenumber1.6Metres at which a player on foot can open the garage.
storeRangenumber5.0Metres at which a driver can store or return the vehicle.
occupiedRadiusnumber2.5Radius used to decide that a parking spot is taken.
marker.texturestableby typeTexture of the marker for each type of point: public, depot, job, rental.
marker.defaultstring'garage'Texture for the types that are not listed.
marker.sizetable0.819 on each axisSize of the marker.
marker.rotationtablex = 90, y = 180, z = 0Rotation of the marker.
marker.colortablewhite, a = 230Colour and opacity: r, g, b, a.
marker.heightnumber0.0Height of the marker above the access point.
marker.bouncetableenabledUp and down movement: enabled, amplitude, speed.
marker.fallbacktableblue arrowPlain marker drawn when the texture file cannot be loaded.

Common changes ​

Charge cash only ​

shared/config.lua
lua
payment = {
    account = 'cash',
    allowCashFallback = false,
},

Limit vehicles per garage ​

Enable the option, then set the number on each garage in the admin panel.

shared/config.lua
lua
capacity = {
    enabled = true,
},

Let police and mechanics impound ​

data/impound.lua
lua
jobs = { 'police', 'mechanic' },

Share keys of a job fleet ​

data/keys.lua
lua
sharedKeys = {
    enabled = true,
    jobs = {
        police = { requireOnduty = true, vehicles = { 'police', 'police2' } },
    },
},

Run a cleanup every day at 4 am ​

data/carwipe.lua
lua
auto = {
    enabled = true,
    expression = '0 4 * * *',
    countdown = 120,
},

© Cuxial