Config
Framework & Inventory
Config.Framework
Controls which framework bridge is used.
'auto'– detects ESX or QBCore based on running resources.'esx'– force ESX.'qbcore'– force QBCore.
The bridge provides helpers like:
Framework.GetIdentifier(src)Framework.GetBlackMoney(src)Framework.RemoveBlackMoney(src, amount, reason)Framework.AddBlackMoney(src, amount, reason)
Config.Inventory
Controls which inventory integration is used.
'auto'– tries to detect ox_inventory or qb-inventory.'ox'– force ox_inventory.'qb'– force qb-inventory.
The bridge exposes:
Bridge.Inventory.RegisterStash(stashId, label, slots, weight, ownerIdentifier, extra, coords)Bridge.Inventory.AddItem(stashId, item, amount, metadata, slot)Bridge.Inventory.OpenStash(src, stashId, label, slots, weight)Bridge.Inventory.ClearStash(stashId)Bridge.Inventory.RemoveStash(stashId)Bridge.Inventory.CanWatchStash()andBridge.Inventory.IsStashEmpty(stashId)(optional, for auto-cleanup)
Make sure your inventory resource is started before the blackmarket.
Config.Target
Controls which target resource is used for drop points and NPC interaction.
'auto'– detect ox_target or qb-target.'ox'– force ox_target.'qb'– force qb-target.
The bridge provides:
Bridge.Target.AddDropPoint(index, coords, heading, label, icon, distance, callback)Bridge.Target.AddNpcTarget(ped, label, icon, distance, callback)
Black money account
For ESX, the default is usually
'black_money'.For QBCore, point this to whichever account represents illegal money in your economy (e.g.
'black_money','markedbills', etc.).
The bridge uses this map to implement Framework.GetBlackMoney and related operations.
Tablet app (lb-tablet)
Set
Config.LBTablet = trueto enable lb-tablet mode.
When enabled, the UI is loaded as a tablet app with:
Identifier:
Config.IdentifierDisplay name:
Config.NameDescription:
Config.DescriptionApp developer string:
Config.DeveloperConfig.DefaultAppdecides whether it appears pinned by default in the tablet.
When Config.LBTablet = false, the script runs in standalone NUI mode and uses:
Config.CommandStandaloneto open (/blackmarketby default).
Locale & notifications
Config.Localeselects which file fromlocales/is loaded on the client. Add your ownlocales/xx.luato support more languages.Config.NotifyTypecontrols which notification provider is used byNotifyPlayer:'esx'– use ESX built-in notifications.'okok'– useokokNotify.'brutal'– custom notification system (example).'ox'– useox_libnotifications.
Config.AdminGroupis used in ESX permissions to decide who can run admin commands. For QBCore the implementation is usually permission-based.
Drop points & delivery
Each entry defines a potential drop location for orders.
x, y, z– coordinates.w– heading (optional).
A random drop point is chosen for each order when checking out.
Delivery behaviour
UseExpiry– enable or disable expiry logic.ExpiryMinutes– how long the order is valid.Pre-open expiry: if the stash is never opened, it will be removed and the order marked as expired.
Post-open expiry: once the stash is opened, a countdown starts; after the timer, it will be cleared & removed if still active.
StashSlots&StashWeight– capacity of the stash in your inventory system.Label– visual label (stash name).SetWaypoint– whether to automatically place a waypoint on the player’s map.ShowBlip– whether to show a temporary blip around the drop.
Auto restock & stock persistence
Mode = 'restart'— Restocks once on server/resource restart.Mode = 'daily','weekly','monthly'— Starts a background loop that checks elapsed time since last restock and refills items tomaxStock.Mode = 'none'— No automatic restock; stock only changes on purchase or admin commands.
Stock itself is stored in:
Memory (runtime
ItemsIndex)blackmarket_stock.jsonin the resource folderMySQL
bm_itemstable (for analytics / persistence)
NPC configuration
Enabled– toggle NPC entirely.Model– ped model name (string).Coords– location & heading of the NPC.Scenario– optional scenario to play (idle animation).Distance– target interaction range.TargetIcon– icon shown by target resource.TargetLabel– text shown in the target menu.
Players can talk to this NPC to open the Blackmarket UI.
Items configuration
Items are defined as a map under Config.Items:
Each item supports:
label– name shown in the UI.price– price per unit (in black money).image– file name for icon (relative toui/dist/imagesor your chosen folder).stock– initial stock on first sync.maxStock– cap for restocks.category– one of:"pistols","smg","rifles","ammo","melee","misc"
You may also use human-readable categories and let the script normalize them, e.g. "pistolji", "municija", "puske" are converted to internal categories.
After editing Config.Items, run:
to rebuild the index and sync everything to DB.