How to Install SleepyCode Garages V1 on FiveM ESX
Full installation guide for SC Garages V1 - ESX garage system for FiveM. SQL setup, dependencies, config.lua options, commands and showroom.
SC Garages V1 is an ESX garage system for FiveM roleplay servers. It provides unlimited garage locations, vehicle class separation (cars, bikes, boats, planes), an optional showroom, impound integration, a plate-change system, and a co-ownership command - all built on ox_lib and ox_target.
> Framework: ESX only. This script does not support QBCore, QBox, or Standalone.
Dependencies
| Resource | Where to get it |
|---|---|
| ox_lib | github.com/overextended/ox_lib |
| ox_target | github.com/overextended/ox_target |
| oxmysql | github.com/overextended/oxmysql |
Installation Steps
1. Place the resource
Extract the downloaded folder (from Keymaster after purchase) and place it inside your server's resources directory.
2. Import the SQL
Unlike Garages V2, Garages V1 requires a manual SQL import. Execute the provided .sql file against your server database before starting the resource for the first time.
The SQL creates the owned_vehicles table with the following fields:
| Column | Description |
|---|---|
| owner | ESX identifier of the vehicle owner |
| plate | vehicle license plate |
| vehicle | vehicle model and state as JSON |
| stored | whether the vehicle is currently in a garage |
| pound | impound location name (if towed) |
| mileage | tracked odometer value |
| glovebox | glovebox inventory contents |
| trunk | trunk inventory contents |
3. Add to server.cfg
ensure ox_lib
ensure ox_target
ensure oxmysql
ensure sc_garages4. Configure the script
Edit config.lua to match your server setup. The key sections are covered below.
5. Restart and test
Restart the server and approach a configured garage zone. The ox_target label should appear and allow you to open your vehicles.
Debug Mode
Config.Debug = falseSet to true while setting up to see zone and target information in the server console.
Vehicle Image Directory
Config.ImgDirectory = "nui:/ox_inventory/web/images/"This path is used to display vehicle images in the garage UI. Change it if your inventory resource stores images in a different location.
Vehicle Classes
The script separates vehicles into four classes:
[1] = "car"
[2] = "sea"
[3] = "air"
[4] = "bike"Each garage zone in config.lua is assigned one or more of these class IDs, so you can create car-only garages, boat docks, and airstrips separately.
Impound Configuration
Config.Impound = {
PedModel = "s_m_y_dockwork_01",
Price = 5000, -- cost to retrieve a vehicle from impound
Account = "money", -- ESX account used for payment
}Key System Integration
Config.KeySystem = {
active = true,
item = "carkey", -- inventory item name for car keys
}Set active = false if you do not use a key-item system on your server.
Plate Change Command
Players can change their vehicle plate in-game for a fee:
Config.PlateChange = {
Command = "plate",
Price = 5000,
Account = "money",
Length = { Min = 6, Max = 8 }, -- plate must be 6–8 characters
Blacklist = { "KURWA" }, -- blocked plate strings
}Usage: Drive up to the plate-change NPC, open the interaction, and enter a new plate string using /plate. Only uppercase letters and numbers are accepted.
Admin Commands
| Command | Syntax | Access | Description |
|---|---|---|---|
| `/givecar` | `/givecar [id] [model] [type]` | admin, superadmin | Give a vehicle to a player |
| `/subowner` | `/subowner` | any player | Add a co-owner while inside the vehicle |
The /givecar command is restricted to players with ESX admin level "best", "admin", or "superadmin".
Boats Configuration
Config.Boats = {
PedModel = "mp_f_bennymech_01",
Blip = { sprite = 50, scale = 0.7, color = 8 },
}Showroom
Garages V1 includes an optional vehicle showroom located underground (around Z = -49.0573). The showroom has:
- A configurable entry point (EnterShowroom vec4)
- An exit zone with dimensions
- Ten vehicle display slots (Zones table), each defined by a vec4 coordinate and heading
If you move the showroom, update both the EnterShowroom position and the exit box to match.
Map Blips
| Type | Sprite | Color |
|---|---|---|
| Vehicle garage | 50 | 3 (blue) |
| Planes garage | 50 | 6 (yellow) |
| Boats dock | 50 | 8 (dark blue) |
| Impound | 50 | 5 (orange) |
Blip settings (sprite, scale, colour) are all editable in config.lua.
Common Issues
SQL import error - Make sure you run the .sql file against the correct database. The table name is owned_vehicles. If the table already exists from a previous garage script, back up and drop it first.
Vehicles not appearing in garage - The plate stored in the owned_vehicles table must match the in-game plate exactly (uppercase, no extra spaces).
ox_target label not showing - Confirm ox_target is listed before sc_garages in server.cfg and that your target resource version is up to date.
Key item not given on vehicle retrieval - Check that Config.KeySystem.item matches the item name registered in your inventory (e.g. "carkey").
Support
For help, join the SleepyCode Discord at discord.gg/qCDt8u7Efgdiscord.gg/qCDt8u7Efghttps://discord.gg/qCDt8u7Efg. Include your ESX version, ox_lib version, and console error output. Purchase Garages V1 at sleepycode.eu/scriptssleepycode.eu/scripts/scripts.