Garages V2
Framework and Integrations
Framework detection, bridge API, locale support, target systems, and car keys integration in Garages V2.
On this page10 sections
Framework detection
Garages V2 detects your framework on startup in this order:
qbx_coreqb-corees_extended- standalone fallback
Bridge API
| Function | Description |
|---|---|
Bridge.GetPlayerFromId(source) | Get a player object with a unified API |
Bridge.GetPlayers() | Get all online player IDs |
Bridge.IsAdmin(source) | Check admin permissions |
Bridge.Notify(source, message, type, duration) | Send a notification |
Bridge.RegisterCallback(name, cb) | Register a server callback |
Bridge.RegisterCommand(name, groups, cb, restricted, info) | Register a command |
Bridge.GetIdentifier(source) | Get the player identifier |
Player object methods
| Method | Returns |
|---|---|
.identifier | Framework identifier |
.source | Server ID |
.getName() | Player name |
.getJob() | Job table |
.getGroup() | Admin group |
.getMoney() | Cash amount |
.getAccount(acc) | Account object |
.removeMoney(amount) | Remove cash |
.removeAccountMoney(acc, amount) | Remove account money |
Framework notes
ESX
Uses xPlayer.getGroup() and compares it to Bridge.Config.ESX.AdminGroups.
It also listens for esx:setJob to refresh garage blips after job changes.
QBCore
Uses QBCore permissions from Bridge.Config.QBCore.AdminPermissions.
Example:
Bridge.Config.QBCore = { AdminPermissions = { "admin", "god" }, DefaultCommandRank = "admin", NotifyTypeMap = { error = "error", success = "success", warning = "warning", inform = "primary", info = "primary", },}QBox
Uses groups from Bridge.Config.QBox.AdminGroups.
Standalone
Uses ACE permissions from Bridge.Config.Standalone.AdminAces.
There is no economy backend in standalone mode.
getMoney() returns 999999.
Example framework config:
Bridge.Config.ESX = { AdminGroups = { "admin", "superadmin", "owner" },}Bridge.Config.QBox = { AdminGroups = { "admin", "superadmin", "god", "owner" },}Bridge.Config.Standalone = { AdminAces = { "command", "admin" },}Locale system
Adding a language
- Create a new file in
locales/. - Copy the structure from
locales/en.json. - Translate the values.
- Set
Config.Localeto your new language code.
Fallback
Missing keys automatically fall back to English.
String formatting
Locale strings support string.format placeholders.
local text = locale("give_car.you_received_it", "Adder", "ABC123")You can also fetch the full locale table:
local allLocales = localeAll()Available languages
enpl
Target system
Garages V2 supports:
ox_targetqb-targetqtargetinteract
To force a specific target resource:
Config.Target = { Resource = "ox_target", KnownResources = { "ox_target", "qb-target", "qtarget", "interact" },}To disable targets and use markers with keys:
Config.UseTarget = falseCar keys integration
Garages V2 supports 9 car key resources and can auto-detect them at startup.
For a custom key system, define a handler in Config.CarKeys.functions.
Config.CarKeys = { Resource = "", KnownResources = { ... }, functions = function(source, plate, action) if action == "addKey" then exports.my_keys:GiveKey(source, plate) elseif action == "removeKey" then exports.my_keys:RemoveKey(source, plate) end end,}Webhooks
Set ConfigServer.Webhook to enable Discord logs.
Set ConfigServer.SteamAPIKey to show Steam avatars in supported logs.
ConfigServer = { Webhook = "https://discord.com/api/webhooks/YOUR_WEBHOOK_URL", SteamAPIKey = "YOUR_STEAM_API_KEY",}Each log template supports placeholder values like %1, %2, and %3.
Supported embeds can include Steam avatars when ConfigServer.SteamAPIKey is set.
Every embed also appends Steam, Discord, and License identifiers.
Version check
Garages V2 includes an automatic version checker.
How it works
- The current version is read from
fxmanifest.lua. - On startup, the server fetches
version.jsonfrom the configured URL. - When an update exists, the server prints the changelog and update link in console.
Example output:
[sc_garages] UPDATE AVAILABLE: v1.0.0 -> v1.2.0Config options
| Option | Type | Default | Description |
|---|---|---|---|
Config.VersionCheck.Enabled | boolean | true | Enable version checks |
Config.VersionCheck.Url | string | GitHub raw URL | Version file URL |