XyraLScripts
Installation guide

XS-Garages

Garages for Qbox and QBCore, all built in game: public garages, job and gang motor pools, private lock-ups and impound lots, with a garage screen that shows every car.

01

Requirements

  • ox_lib and oxmysql
  • Qbox (qbx_core) or QBCore (qb-core)
  • OneSync, which is on by default

Your target, vehicle keys, fuel and banking scripts are found on their own. Garages open with E by default. Set Open with to target in Settings, or per garage on its Look tab, to use your target script instead.

02

Installation

  1. Stop your old garage script and take it out of server.cfg. Two garage scripts fight over the same cars.
  2. Drop XS-Garages into your resources and add ensure XS-Garages after ox_lib and oxmysql.
  3. Give your staff the builder: add_ace group.admin xs.garages.admin allow
  4. Restart the server. The tables make themselves, and the standard garages are added on the first start.
  5. Join and type /garagebuilder to change them or add your own.

Gang garages are added switched off, because gang names differ per server. Pick the gang and switch them on in the builder.

03

The builder

/garagebuilder opens the builder. The Overview shows what still needs doing and what XS-Garages found on your server.

  • Desks: where players open the garage. Show an attendant, a pay machine or a marker, and pick a map icon from the real GTA icons.
  • Bays: where cars come out. A ghost car follows the camera, Scroll turns it, and F snaps it onto a parked car.
  • Parking spots: where players drive in to park. Use the bays copies them.
  • Vehicles: find any car, see where it is, send it to a garage, impound it or let it go.
  • Settings: about 90 settings, live for everyone with no restart. Ctrl+K searches settings and garages.
04

Kinds of garage

  • Public: anyone parks and takes out their own cars.
  • Job: for one job, from a lowest rank, on duty if you want. Personal cars, cars shared with the job and a motor pool.
  • Gang: the same for one gang.
  • Private: one owner who buys or rents it, plus the people they give a key.
  • Impound lot: where impounded and missing cars are paid out.

Each garage takes cars, boats, aircraft or anything. The standard GTA garages, hangars, boathouses and impound lots use the same names as qb-garages and qbx_garages, so cars already parked stay where they were.

05

Parking and taking out

At a desk, the garage screen shows every car with its picture, plate, where it is, fuel, engine, body and mileage. Addon cars without a picture get an icon. Drive into a parking spot and press E to park.

  • Cars keep their mods, damage and fuel, and come out with your keys.
  • A car parked at another garage can be fetched for a moving fee, or any public garage can hand out any car.
  • Name your cars, star your favourites, give one to someone next to you, or leave it for your job or gang.
  • /findcar marks your cars that are out on the map.
  • Garages can keep parked cars visible in their bays. Walk up to yours and take it out.
06

Motor pools

A job or gang garage can have a vehicle list, each with a lowest rank, livery, extras, colours, full tuning and a plate start. A vehicle is either borrowed for the shift or bought once for the crew. Borrowed ones go back when parked or when the driver logs out, and each player can have one out at a time.

07

Private garages

Set a price, a rent and the number of spaces. Players buy or rent at the desk and give keys to up to six people. Rent comes out of the bank every 7 days on its own. If it cannot be paid, the garage is taken back after the grace days and the cars move to the nearest public garage. Owners can sell it back for 60%.

08

Impound

Police on duty impound from the vehicle target or /impound, with a fee, a hold time and a reason. The fee goes to the police account. The tow job can impound too, without holds. After the hold, the owner pays at an impound lot and the car comes out.

With XS-PoliceSystem running, its own impound is used and its held cars show as held here.

Cars left out at a server restart go back to their garage or to the impound lot, and a car deleted out on the road can be collected from a lot for a fee.

09

Your other scripts

Cars stay in your framework's player_vehicles table, so dealership, phone and police scripts keep working. XS-Housing adds a garage at every house that has one, and XS-Phone's Garage app and valet read the same cars.

exports['XS-Garages']:RegisterGarage takes the same options as qbx_garages, so a script that supports qbx_garages needs one line changed.

10

Troubleshooting

/garagebuilder does nothing

You do not have access. Run add_ace group.admin xs.garages.admin allow and restart.

The console says another garage script is running

Stop qb-garages, qbx_garages or jg-advancedgarages and take it out of server.cfg. Both would move the same cars.

A car comes out without keys

Your key script was not found. Check what the builder's Overview found, or set Config.Bridges.keys to your key script's name.

A car is in no garage

It was parked in a garage that no longer exists. Any public garage can hand it out.

Some cars have no picture

Addon cars are not in FiveM's picture library, so they show an icon. Point Settings › General › Car pictures at your own images to change that.

11

Updating

  1. Back up the database first.
  2. Keep a copy of your edited config.lua.
  3. Replace the resource folder, merge your config back and restart.

Garages, owners, impounds and settings live in the database, so nothing you built is lost.

12

Support

Bugs and questions go to the Discord. Include your server's console output — the resource prints the reason when it refuses to do something, and that line is usually the whole answer.

XS-Garages on GitHub