☰ All guides
6-garage
Garage with a showroom preview, search, favourites, vehicle stats and an impound lot. 45 garages are preconfigured.
Resource folder
six_garage
01Requirements
- ESX (1.1, 1.2 or Legacy). QB-Core is not supported.
oxmysql(ormysql-async: swap the line infxmanifest.lua, it is marked with a comment).- The table
owned_vehicleswith the columnsstored,typeandisFav.
02Installation
- 01Sign in to the Cfx Portal with the account you bought with and download the script under Granted Assets.
- 02Unzip the download and move the folder
six_garageinto theresourcesfolder of your server. Keep the folder name and upload every file, including the hidden.fxap. - 03Add the column for favourites to your vehicle table (statement below).
storedandtypealready exist on a standard ESX Legacy database. - 04Remove or stop your old garage script, so two garages don't write to the same vehicles.
- 05Add
ensure six_garageto yourserver.cfg, belowes_extendedandoxmysql. - 06Restart the server (or run
refreshand thenensurewith the folder name in the server console).
ALTER TABLE owned_vehicles ADD COLUMN isFav TINYINT(1) NOT NULL DEFAULT 0;
Good to know
On every server start the script parks all vehicles back into the garage (stored = 1). Vehicles that were left outside before the restart are therefore not on the impound lot afterwards.
03How players use it
- Park out: walk to the garage NPC, press E, pick a vehicle in the preview and park it out. It spawns on the first free spot of
parkOutPosition. - Park in: drive onto the park-in point and press E.
- Impound: vehicles that are not stored can be bought back at an impound lot for
ImpoundPrice.
04Configuration
Option
- General.newESX
truefor ESX Legacy (1.2 and newer),falsefor old ESX 1.1.- General.ServerName
- Name shown in the garage menu.
- General.Language
"en"or"de". Texts are inConfig.Locales.- General.ImpoundSystem
- Switches the impound lots on or off.
- General.ImpoundPrice
- Price to get a vehicle back from the impound.
- General.RotateCars
true: the vehicle slowly rotates in the preview.- GaragenSystem.VehicleDataMaxvalues
- Values that count as 100 % for the bars weight, performance, top speed and brakes. Raise them if your tuned cars always show full bars.
- GaragenSystem.VehicleShowcase
- The preview scene per vehicle class (
Car,Boat): position of the vehicle, camera offset, field of view, optional spotlight. - GaragenSystem.Impound
- List of impound lots.
- GaragenSystem.GaragePoints
- List of garages.
›config.luaComplete file · 109 lines
Config = {}
Config.General = {
newESX = true, -- Set to false if you are using the old ESX
ServerName = "SIX-SERVICES",
Language = "en",
ImpoundSystem = true, -- Enable/Disable Impound System
ImpoundPrice = 5000, -- Price to get your vehicle back from the impound
RotateCars = true, -- Enable/Disable the rotation of the vehicles in the garage
}
Config.Locales = {
['de'] = {
['private_garage'] = 'Privat Garage',
['impound_garage'] = 'Abschlepphof',
['search'] = 'Suche nach Fahrzeugen',
['park_out'] = 'Ausparken',
['vehicle_unstored'] = 'Fahrzeug ~g~ausgeparkt',
['vehicle_stored'] = 'Fahrzeug ~g~eingeparkt',
-- Help Notifys
['open_garage'] = 'Drücke ~INPUT_CONTEXT~ um das Garagen Menu zu öffnen',
['open_impound'] = 'Drücke ~INPUT_CONTEXT~ um das Abschlepphof Menu zu öffnen',
['park_in'] = 'Drücke ~INPUT_CONTEXT~ um dein Fahrzeug einzuparken',
-- Vehicle Data Maxvalues
['mass'] = "Gewicht",
['performance'] = "Leistung",
['top_speed'] = "Top Speed",
['brakes'] = "Bremsen",
-- Failures
['unknown_vehicle'] = 'Kein Name',
['no_impounded_vehicles'] = "Sie haben kein Fahrzeug auf den Abschlepphof",
['no_vehicles_in_garage'] = "Kein Fahrzeug in ihrer Garage gefunden",
['no_free_spot'] = "Kein freier Parkplatz gefunden!",
['invalid_model'] = "Das Modell existiert im Spiel nicht.",
['cant_spawn_vehicle'] = "Fahrzeug konnte nicht erstellt werden.",
['not_enough_money'] = "Du hast nicht genug Geld um das Fahrzeug freizukaufen",
},
['en'] = {
['private_garage'] = 'Private garage',
['impound_garage'] = 'Impound Station',
['search'] = 'Search for vehicles',
['park_out'] = 'Park out',
['vehicle_unstored'] = 'Vehicle ~g~parked out',
['vehicle_stored'] = 'Vehicle ~g~stored',
-- Help Notifys
['open_garage'] = 'Press ~INPUT_CONTEXT~ to open the garage menu',
['open_impound'] = 'Press ~INPUT_CONTEXT~ to open the impound menu',
['park_in'] = 'Press ~INPUT_CONTEXT~ to park your vehicle',
-- Vehicle Data Maxvalues
['mass'] = "Weight",
['performance'] = "Performance",
['top_speed'] = "Top Speed",
['brakes'] = "Brakes",
-- Failures
['unknown_vehicle'] = 'Unknown Vehicle',
['no_impounded_vehicles'] = "You have no vehicles in the impound lot",
['no_vehicles_in_garage'] = "No vehicle found in your garage",
['no_free_spot'] = "No free parking spot found!",
['invalid_model'] = "The model doesn't exist in the game.",
['cant_spawn_vehicle'] = "Vehicle couldn't be spawned.",
['not_enough_money'] = "You don't have enough money to retrieve the vehicle.",
}
}
Config.GaragenSystem = {
VehicleDataMaxvalues = {
fMass = 2600.0,
fInitialDriveForce = 0.65,
fInitialDriveMaxFlatVel = 300.0,
fBrakeForce = 3.5
},
VehicleShowcase = {
["Car"] = {
PreviewPoint = vector4(-1266.9479980469, -3010.8173828125, -48.490211486816, 360.0),
PedCoords = vector3(-1291.6361083984, -3011.99609375, -48.489936828613),
PreviewSteeringAngle = -35.0,
PreviewCameraFOV = 40.0,
PreviewCameraLookAtVehicleOffset = vector3(0.0, 0.0, 0.0),
PreviewCameraOffset = vector3(-5.0, 10.0, 1.0),
},
["Boat"] = {
PreviewPoint = vector4(569.01, -3163.51, -0.06, 179.22),
PreviewSteeringAngle = 35.0,
PreviewCameraFOV = 55.0,
PreviewCameraLookAtVehicleOffset = vector3(0.25, -0.25, 1.0),
PreviewCameraOffset = vector3(14.75, -17.98, 10.75),
SpotLightOffset = vector3(14.75, -17.98,16.0),
SpotLightRotOffset = vector3(-30.0,80.0,-90.0),
EnableSpotLight = true,
}
},
Impound = { ... }, -- see "Impound lots" below
GaragePoints = { ... }, -- see "Garages" below
}
05Adding a garage
Copy an entry inside GaragePoints and change the coordinates. Coordinates with four values end with the heading.
{
label = "Garage",
type = {"car"}, -- matches the column "type" in owned_vehicles
ped = "s_m_m_fiboffice_01", -- NPC model
accessGaragePosition = vector4(275.29, -345.43, 45.17, 339.86), -- where the NPC stands
parkInPosition = vector3(271.76, -336.24, 44.91), -- where players park in
parkOutPosition = { -- spawn spots, first free one is used
vector4(266.81, -332.30, 44.91, 246.18),
vector4(267.81, -328.74, 44.91, 252.30),
},
blip = { sprite = 524, scale = 0.6, colour = 29 },
PreviewConfig = "Car", -- scene from VehicleShowcase
},
Field
- type
- Which vehicles the garage lists. The value is compared with the column
typeof the vehicle. - accessGaragePosition
- Position of the NPC. Impound lots use
accessImpoundPositioninstead and have noparkInPosition. - parkOutPosition
- Add as many spots as the place has room for. If all are blocked the player gets “No free parking spot found”.
- PreviewConfig
CarorBoat, or a scene you added toVehicleShowcase.
06Troubleshooting
SQL error “Unknown column 'isFav'”
Run the ALTER TABLE statement from the installation.
The garage is empty although the player owns vehicles.
The column type of the vehicles does not match the type of the garage (for example car), or the vehicles are marked as not stored and therefore sit on the impound lot.
“The model doesn't exist in the game”
The vehicle is saved in the database but its resource is no longer started on the server.
07Still stuck?
Open a ticket on our Discord. Send the script name, your framework and version, and the full error from the server console (F8 for client errors). That saves a round of questions.
