Black Market Script Overview
This Black Market script brings immersive underground trading mechanics to your FiveM RP server, built for the ESX framework and fully utilizing modern tools like ox_target, ox_lib, and vms_notifyv2. It enables dynamic dealer interactions, randomized stash deliveries, police alert risks, and bribe opportunities—all with multi-language localization support.
PREVIEW : https://youtu.be/xbDNx4J3dOE
Features
📞 Phone Booth System
Players interact with phone booths across the map to initiate a black market call.
The booths can randomly be out of order based on a configurable chance (
Config.BrokenPhoneChance).Calls are subject to a global cooldown to prevent spamming (
Config.PhoneBoothCooldown).
🧑💼 NPC Dealer Interactions
NPC dealers appear at randomized locations defined in
Config.Dealers.Players can choose from multiple dealers using an ox_lib context menu.
Each dealer has unique items, refusal chances, bribe settings, and stash drop spots.
🛍️ Black Market Shop System
Players access a contextual menu to:
Browse and add items to a virtual shopping cart.
Confirm purchases which are then delivered to a random stash location.
Each item includes dynamic pricing and accepted currencies (money, crypto, etc).
💸 Bribe & Refusal System
Dealers can refuse trades based on a set chance (
refuseChance).Players are then given a chance to offer a randomized bribe.
Bribes can succeed or fail, potentially triggering a police alert.
🚔 Police Integration
If refused and not bribed, dealers can call the police via
cd_dispatch.Police get notified with location data if enabled (
Config.PoliceSeeStash).
📦 Stash System
Purchases are not handed over instantly, but placed in a hidden stash box at random coordinates.
Players receive GPS coordinates to retrieve their goods.
Boxes auto-despawn after a set duration (
Config.StashDespawnTime) and may be stolen if allowed.
🌍 Dynamic Localization
Multi-language support for all UI text, notifications, and prompts.
Config.Localeallows easy switching between English (en) and Czech (cs).All strings are centralized in
locales.luafor easy translation.
🧾 Full Configurability
Define multiple dealers with:
Unique models, locations, cooldowns, items, currencies.
Individual bribe and refusal mechanics.
Associated stash drop zones.
How It Works
Calling a Dealer
Player interacts with a phone booth using
ox_target.A menu appears allowing selection of a specific dealer.
Dealer Encounter
The dealer spawns at a random configured location.
The player walks up and selects items to add to their cart.
Upon confirming, a stash is generated elsewhere in the world.
Handling Refusals
If refused, players can:
Attempt a bribe.
Risk a police alert if they decline or fail.
Collecting the Goods
After a successful trade, players receive GPS coordinates to the stash box.
A lockpick minigame (
t3_lockpick) is used to unlock the stash.Items are granted via server event on success.
Configuration
Locale:
Config.Locale = "en"or"cs"Cooldowns: Global phone booth and per-dealer cooldowns.
Refusal Logic:
refuseChance,bribeChance,bribe.Police Settings: Dispatch on failed interactions.
Stash Settings: Time-limited and optionally lootable by others.
Dealers: Fully customizable list with individual items, currencies, and locations.
Escrow Compatibility
This script supports FiveM's escrow system.
Core logic can be protected while keeping
config.luaandlocales.luaopen for customization.Supports modular translation, item management, and dealer definitions.
Requirements
Framework: ESX
Target System: ox_target
Menu System: ox_lib
Notification System: vms_notifyv2
Dispatch (Optional): cd_dispatch
Lockpick Game (Optional): t3_lockpick