Cuxial Garages creates its own tables on first start. The only manual work is adding the inventory items and removing the garage and key resources it replaces.
Check the dependencies
These resources must be installed and working first:
ox_liboxmysqlcuxial_bridge, with one of the supported frameworks: QBox, QBCore or ESX- OneSync enabled on the server
ox_inventory, for the key, lockpick and rental contract items
The rest are optional integrations. Each one is detected when it is running: ox_target, cuxial_gang, cuxial_police, cuxial_license, cuxial_fuel, lb-phone, jg-dealerships and rahe-speakers. jg-dealerships and rahe-speakers also need finance.enabled = true and speakers.enabled = true in shared/config.lua. The overview says what each one adds.
On ESX the resource adds the columns id, model, state, garage, depotprice and mileage to owned_vehicles on first start. On QBox and QBCore it uses player_vehicles as it is.
Copy the resource
Place the cuxial_garages folder inside your resources directory. Keep the folder name as it is.
Remove what it replaces
Delete or comment out every other garage resource and every other vehicle key resource:
# your previous garage resource
# ensure qbx_vehiclekeysStop qbx_vehiclekeys before starting Cuxial Garages. Cuxial Garages registers its exports GiveKeys, HasKeys and RemoveKeys itself, so scripts that call them keep working.
Add the items
Paste this block into ox_inventory/data/items.lua, inside the return { } table:
['vehiclekeys'] = {
label = 'Vehicle keys',
weight = 100,
stack = false,
close = true,
description = 'Key of one specific vehicle.',
client = {
image = 'vehiclekeys.png',
},
},
['rentalticket'] = {
label = 'Rental contract',
weight = 10,
stack = false,
close = true,
description = 'Contract of a rented vehicle. Use it to see the receipt.',
},Then copy install/vehiclekeys.png and install/rentalticket.png to ox_inventory/web/images/.
stack = false is required on both. Each key and each contract carries its own data (plate, ticket code). Stacked items get mixed and lose the vehicle they belong to.
The lockpick items lockpick and advancedlockpick come with ox_inventory by default. Add them if your install does not have them.
Item names can be changed, as long as they match the config:
| Item | Where it is set |
|---|---|
vehiclekeys | data/keys.lua → item |
lockpick, advancedlockpick | data/keys.lua → lockpick.normal.item, lockpick.advanced.item |
rentalticket | data/rental.lua → ticketItem |
Set the convars
Both are optional.
# Language of notifications, prompts and command help (en and es are included)
setr ox:locale "en"
# Debug traces in the console
setr cuxial_garages_debug "0"The language of the interface is set separately, with language in shared/config.lua. Set both to the same language.
Start the resource
Start it after its dependencies, your framework and the optional integrations you use:
ensure ox_lib
ensure oxmysql
# your framework here (qbx_core, qb-core or es_extended)
ensure ox_inventory
ensure cuxial_bridge
ensure cuxial_garagesNo SQL to run. On first start the resource creates cuxial_garages, cuxial_garages_meta, cuxial_garages_impound, cuxial_garages_rental and cuxial_garages_rentals, and prints a line that starts with [cuxial_garages][mysql] in the server console.
Give yourself staff access
The admin panel checks the permission in admin.permission ('admin' by default) through your framework. /adminkey, /carwipe and /cancelwipe also need the ACE group group.admin:
add_principal identifier.license:xxxxxxxxxxxxxxxx group.adminDetails in Commands & permissions.
Import the sample data (optional)
A new install has no garages. Create them from the panel, or import the examples in install/ to start from a populated map:
| File | Installs |
|---|---|
garages_public.sql | Six public garages: Legion Square, Del Perro Pier, Sandy Shores, Paleto Bay, a marina and an airport hangar |
garages_jobs.sql | One job garage: the Mission Row police, with a fleet of base-game vehicles |
impounds.sql | Impound depots |
Import them after the first start, when the tables exist, then restart the resource. They can be imported again without creating duplicates. Job names and fleets in these files are examples: adjust them in the panel.
Rental points have no sample file. They are created from the panel.
Check that it works
- Join the server and type
/garageadmin. The panel opens. - Create a public garage and place its access point and parking spots in game.
- Walk to the marker and press E. The garage opens with your vehicles.
- Take a vehicle out. A key with its plate arrives in your inventory and L locks it.
- Drive back to the marker and press E. The vehicle is stored and the key is removed.
Next: adjust the script to your server in Configuration.
