SleepyCode
Home
AboutBlogSubscriptionDocs
Cart0
SleepyCode
Cart0
  • πŸ’£Documentation

Scripts

  • Multicharacter
  • DevTool
  • Fishing
  • πŸ—ƒοΈGarages V2
    • What's New
    • Installation
    • Config File
    • Features
    • Exports and Hooks
    • Framework and Integrations
    • Commands
    • Troubleshooting
  • 🚌Bus Job
  • πŸš—Vehicle Shop V1
  • πŸ—ƒοΈGarages V1
  • 🍁Selldrugs
  • πŸŽ…Advent Calendar
  1. Docs
  2. /Garages V2
  3. /Framework and Integrations

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
  • Bridge API
  • Player object methods
  • Framework notes
  • Locale system
  • Target system
  • Car keys integration
  • Webhooks
  • Version check
  • Useful links

Framework detectionLink copied

Garages V2 detects your framework on startup in this order:

  1. 1.
    qbx_core
  2. 2.
    qb-core
  3. 3.
    es_extended
  4. 4.
    standalone fallback

Bridge APILink copied

FunctionDescription
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 methodsLink copied

MethodReturns
.identifierFramework identifier
.sourceServer 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 notesLink copied

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:

Lua
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:

Lua
Bridge.Config.ESX = {    AdminGroups = { "admin", "superadmin", "owner" },}Bridge.Config.QBox = {    AdminGroups = { "admin", "superadmin", "god", "owner" },}Bridge.Config.Standalone = {    AdminAces = { "command", "admin" },}

Locale systemLink copied

Adding a language

  1. 1.
    Create a new file in locales/.
  2. 2.
    Copy the structure from locales/en.json.
  3. 3.
    Translate the values.
  4. 4.
    Set Config.Locale to your new language code.

Fallback

Missing keys automatically fall back to English.

String formatting

Locale strings support string.format placeholders.

Lua
local text = locale("give_car.you_received_it", "Adder", "ABC123")

You can also fetch the full locale table:

Lua
local allLocales = localeAll()

Available languages

  • en
  • pl

Target systemLink copied

Garages V2 supports:

  • ox_target
  • qb-target
  • qtarget
  • interact

To force a specific target resource:

Lua
Config.Target = {    Resource = "ox_target",    KnownResources = { "ox_target", "qb-target", "qtarget", "interact" },}

To disable targets and use markers with keys:

Lua
Config.UseTarget = false

Car keys integrationLink copied

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.

Lua
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,}

WebhooksLink copied

Set ConfigServer.Webhook to enable Discord logs.

Set ConfigServer.SteamAPIKey to show Steam avatars in supported logs.

Lua
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 checkLink copied

Garages V2 includes an automatic version checker.

How it works

  1. 1.
    The current version is read from fxmanifest.lua.
  2. 2.
    On startup, the server fetches version.json from the configured URL.
  3. 3.
    When an update exists, the server prints the changelog and update link in console.

Example output:

Text
[sc_garages] UPDATE AVAILABLE: v1.0.0 -> v1.2.0

Config options

OptionTypeDefaultDescription
Config.VersionCheck.EnabledbooleantrueEnable version checks
Config.VersionCheck.UrlstringGitHub raw URLVersion file URL

Useful linksLink copied

  • SleepyCode Store
  • SleepyCode Discord (opens in a new tab)
  • Keymaster downloads (opens in a new tab)
← PreviousExports and HooksGarages V2Next β†’CommandsGarages V2

On this page

  • Framework detection
  • Bridge API
  • Player object methods
  • Framework notes
  • Locale system
  • Target system
  • Car keys integration
  • Webhooks
  • Version check
  • Useful links
↑ Back to top
Ready when you are

Put your server on something that holds up

150+ servers run our resources - ESX, QBCore and standalone. Once the payment clears, the package is waiting in Keymaster.

Browse the catalogueAsk on Discord β†—
  • Delivered instantly
  • Support with no expiry
  • 100+ reviews
  • Payment via Tebex

SleepyCode

FiveM Scripts

Checkout is run by Tebex Limited- they handle payment, invoicing and refunds. Β© 2026

Community

  • Discord
  • YouTube
  • X (Twitter)

Navigation

  • Home
  • All Scripts
  • ESX Scripts
  • QBCore Scripts
  • Free Scripts
  • About
  • Blog
  • Documentation
  • Support

Legal

  • Privacy Policy
  • Tebex Privacy Policy
  • Terms of Service
  • Impressum

Β© 2026 SleepyCode. Not affiliated with Rockstar Games or Take-Two Interactive.

Powered byTebex