Installation
1
Install
Install the resource on your Keymaster after purchasing the script. (https://portal.cfx.re/)
3
Here is the config.lua file. (ESX and QBCore)
-----------------------------------------------
-- PBlackMarket - Main Configuration
-- Configuration principale
-----------------------------------------------
Config = {}
-------------------------------------------------
-- Debug Mode / Mode Debug
-------------------------------------------------
Config.Debug = false
-- CLIENT AND SERVER PRINT
-------------------------------------------------
-- Framework / Framework
-------------------------------------------------
Config.Framework = 'ESX' -- ESX / QBCore
-- FR: Framework utilisé (ESX ou QBCore)
-- EN: Framework used (ESX or QBCore)
-------------------------------------------------
-- Command / Commande
-------------------------------------------------
Config.Command = 'pbadmin'
-- FR: Commande pour ouvrir le menu de gestion du BlackMarket
-- EN: Command to open the BlackMarket management menu
-------------------------------------------------
-- ESX Version / Version ESX
-------------------------------------------------
Config.ESXVersion = 'new' -- 'old' / 'new'
-- FR: Version d'ESX ('old' = getSharedObject via TriggerEvent, 'new' = getSharedObject via export)
-- EN: ESX Version ('old' = getSharedObject via TriggerEvent, 'new' = getSharedObject via export)
-------------------------------------------------
-- Langue / Language
-------------------------------------------------
Config.Locale = 'en' -- fr / en / de / es / ru / zh
-- FR: Langue utilisée pour les messages et traductions
-- EN: Language used for messages and translations
-------------------------------------------------
-- ESX Resource Name / Nom de la ressource ESX
-------------------------------------------------
Config.ESXResource = 'es_extended'
-------------------------------------------------
-- QBCore Resource Name / Nom de la ressource QBCore
-------------------------------------------------
Config.QBResource = 'qb-core'
-------------------------------------------------
-- Inventory System / Système d'inventaire
-------------------------------------------------
Config.Inventory = 'auto' -- 'auto' = Auto-detect / 'default' = ESX/QB Default / 'ox' = ox_inventory / 'qs' = Quasar Inventory / 'qb' = qb-inventory
-- FR: Système d'inventaire utilisé (auto détecte automatiquement)
-- EN: Inventory system used (auto detects automatically)
-------------------------------------------------
-- Notification System / Système de notifications
-------------------------------------------------
Config.Notifs = 'ESX' -- ESX / PNotif / Custom / QB
-- FR: Type de système de notifications utilisé
-- EN: Type of notification system used
-- ESX: Utilise les notifications ESX natives
-- PNotif: Utilise le système PNotif
-- Custom: Utilise un système personnalisé
-------------------------------------------------
-- Interaction System / Système d'interaction
-------------------------------------------------
Config.InteractionSystem = 'DrawMarker' -- DrawMarker / ox_target / Custom
-- FR: Type de système d'interaction utilisé
-- EN: Type of interaction system used
-- DrawMarker: Utilise les marqueurs et la touche E
-- ox_target: Utilise ox_target pour l'interaction
-- Custom: Utilise un système personnalisé
-------------------------------------------------
-- Interaction Settings / Paramètres d'interaction
-------------------------------------------------
Config.InteractionDistance = 2.5
-- FR: Distance maximale pour interagir avec le NPC
-- EN: Maximum distance to interact with NPC
Config.MarkerDrawDistance = 10.0
-- FR: Distance maximale pour voir les marqueurs
-- EN: Maximum distance to see markers
Config.Keybind = 38 -- E key
-- FR: Touche pour interagir (E par défaut)
-- EN: Key to interact (default E)
-- Black Market NPCs
Config.NPCs = {
{
name = 'Black Market Dealer',
model = 'g_m_m_armboss_01',
coords = vector4(2433.876953, 4969.213379, 42.338501, 218.267715),
blip = {
enabled = true,
sprite = 374,
color = 1,
scale = 0.7,
label = 'Black Market'
},
marker = {
enabled = true,
type = 27,
scale = { x = 1.5, y = 1.5, z = 1.0 },
color = { r = 255, g = 0, b = 0, a = 100 }
},
allowedJobs = {}, -- Empty = everyone can access
allowedGangs = {} -- For QB gangs
},
{
name = 'Weapon Dealer',
model = 'g_m_m_chigoon_02',
coords = vector4(707.99, -966.98, 30.41, 0.0),
blip = {
enabled = false
},
marker = {
enabled = true,
type = 27,
scale = { x = 1.5, y = 1.5, z = 1.0 },
color = { r = 255, g = 0, b = 0, a = 100 }
},
allowedJobs = {'police'},
allowedGangs = { 'lostmc', 'ballas' }
}
}
-- Sell Items Configuration
Config.SellItems = {
enabled = true,
blackMoneyPercentage = 100,
sellableItems = {
'weed', 'coke', 'meth',
'lockpick', 'advancedlockpick',
'pistol_ammo', 'smg_ammo', 'rifle_ammo',
'thermite',
},
pricePercentage = 60,
customPrices = {
['weed'] = 300,
['coke'] = 600,
['meth'] = 900,
['lockpick'] = 150,
['advancedlockpick'] = 300,
['pistol_ammo'] = 50,
['smg_ammo'] = 75,
['rifle_ammo'] = 100
}
}
-- Black Market Items
Config.Items = {
{
category = 'weapons',
label = 'Weapons',
items = {
{
name = 'WEAPON_PISTOL',
label = 'Pistol',
price = 5000,
image = 'weapon_pistol.png',
stock = 10, -- -1 for unlimited
minRep = 0, -- Minimum reputation required
quantity = 1 -- Quantity received when purchasing
},
{
name = 'WEAPON_PISTOL50',
label = 'Pistol .50',
price = 12000,
image = 'weapon_pistol50.png',
stock = 5,
minRep = 100,
quantity = 1
},
{
name = 'WEAPON_SMG',
label = 'SMG',
price = 25000,
image = 'weapon_smg.png',
stock = 3,
minRep = 250,
quantity = 1
},
{
name = 'WEAPON_ASSAULTRIFLE',
label = 'AK-47',
price = 45000,
image = 'weapon_assaultrifle.png',
stock = 2,
minRep = 500,
quantity = 1
}
}
},
{
category = 'ammo',
label = 'Ammunition',
items = {
{
name = 'pistol_ammo',
label = '9mm Ammo',
price = 500,
image = 'pistol_ammo.png',
stock = -1,
minRep = 0,
quantity = 50 -- Receive 50 bullets per purchase
},
{
name = 'smg_ammo',
label = 'SMG AMMO',
price = 750,
image = 'smg_ammo.png',
stock = -1,
minRep = 50,
quantity = 50
},
{
name = 'rifle_ammo',
label = 'Rifle Ammo',
price = 1500,
image = 'rifle_ammo.png',
stock = -1,
minRep = 100,
quantity = 50
}
}
},
{
category = 'drugs',
label = 'Drugs',
items = {
{
name = 'weed',
label = 'Weed (10g)',
price = 500,
image = 'weed.png',
stock = -1,
minRep = 0,
quantity = 10
},
{
name = 'coke',
label = 'Cocaine (5g)',
price = 2000,
image = 'coke_brick.png',
stock = 20,
minRep = 200,
quantity = 5
},
{
name = 'meth',
label = 'Meth (5g)',
price = 1500,
image = 'meth.png',
stock = 15,
minRep = 150,
quantity = 5
}
}
},
{
category = 'materials',
label = 'Materials',
items = {
{
name = 'lockpick',
label = 'Lockpick',
price = 150,
image = 'lockpick.png',
stock = -1,
minRep = 0,
quantity = 1
},
{
name = 'advancedlockpick',
label = 'Advanced Lockpick',
price = 500,
image = 'advancedlockpick.png',
stock = 10,
minRep = 100,
quantity = 1
},
{
name = 'thermite',
label = 'Thermite',
price = 5000,
image = 'thermite.png',
stock = 5,
minRep = 300,
quantity = 1
}
}
}
}
-- Reputation System
Config.Reputation = {
enabled = true,
startingRep = 0,
gainPerPurchase = 10, -- Reputation gained per 1000$ spent
}
-- Purchase Limits
Config.PurchaseLimits = {
enabled = true,
resetTime = 86400, -- 24 hours in seconds
limits = {
weapons = 2,
ammo = 5,
drugs = 3,
materials = 10
}
}
-- Money Account
Config.MoneyAccount = 'black_money' -- 'money', 'black_money', 'bank', 'cash' (QB)
-- Database
Config.UseDatabase = true -- Save reputation and purchase history
--[[
Auto Stock Reset / Réinitialisation Automatique du Stock
--------------------------------------------------------
Version Française :
Système de réinitialisation automatique du stock.
⚠️ Important :
- Lors de la première configuration, modifiez les valeurs AVANT de lancer le script.
- Si le script est déjà lancé, vous pouvez modifier les paramètres via :
→ la base de données
→ le menu admin /pbadmin en jeu (IG)
Ce système permet de réinitialiser automatiquement les stocks selon un intervalle défini.
English Version:
Automatic stock reset system.
⚠️ Important:
- During the initial setup, edit the values BEFORE starting the script.
- If the script is already running, you can adjust the settings through:
→ the database
→ the admin menu /pbadmin in-game (IG)
This system automatically resets the item stock based on a defined interval.
]]
Config.AutoStockReset = {
enabled = true, -- Enable/Disable auto reset
interval = 3600, -- Default: 3600 seconds (1 hour)
-- Available intervals for admins:
-- 600 = 10 minutes
-- 1800 = 30 minutes
-- 3600 = 1 hour
-- 21600 = 6 hours
-- 43200 = 12 hours
-- 86400 = 24 hours
-- 604800 = 7 days
resetOnRestart = false -- Reset stock when server restarts
}
-------------------------------------------------
-- Cart & Delivery System / Système de Panier et Livraison
-------------------------------------------------
Config.Cart = {
maxCartItems = 50,
deliveryVehicle = 'burrito3', -- DON'T CHANGE PLS
deliveryTime = 300,
deliveryLocations = {
vector4(-365.419769, 6092.676758, 31.436646, 70.866142),
vector4(1618.760498, 3780.224121, 34.638062, 269.291351),
vector4(1729.424194, 3316.074707, 41.209473, 229.606293),
vector4(2534.241699, 2580.501221, 37.940674, 0.000000),
vector4(-2220.118652, 2312.399902, 32.498169, 255.118103)
},
deliveryBlip = {
sprite = 478,
color = 5,
scale = 1.0,
label = 'Delivery Point'
},
vehicleBlip = {
sprite = 67,
color = 5,
scale = 0.8,
label = 'Delivery Vehicle'
}
}
-------------------------------------------------
-- Discord Webhooks Logs / Logs Discord
-------------------------------------------------
Config.DiscordLogs = {
enabled = true,
-- INSERT WEBHOOK HERE
webhooks = {
purchases = '',
sales = '',
deliveries = '',
admin = '',
reputation = ''
},
colors = {
purchases = 3066993,
sales = 15844367,
deliveries = 3447003,
admin = 15158332,
reputation = 10181046
},
logPurchases = true,
logSales = true,
logDeliveries = true,
logAdminActions = true,
logReputationChanges = true,
includeSteamInfo = true,
includeLicenseInfo = true,
includeDiscordInfo = true,
includeServerInfo = false,
thumbnail = 'https://i.imgur.com/YourImageHere.png',
footer = {
text = 'PBlackMarket Logs',
icon_url = 'https://i.imgur.com/YourIconHere.png'
}
}
-------------------------------------------------
-- Traductions / Locales
-------------------------------------------------
LOCALES = {}
function _U(str, ...)
if LOCALES[Config.Locale] ~= nil then
if LOCALES[Config.Locale][str] ~= nil then
return string.format(LOCALES[Config.Locale][str], ...)
else
return 'Translation [' .. str .. '] does not exist'
end
else
return 'Locale [' .. Config.Locale .. '] does not exist'
end
end
Here is the permissions.lua file. (ESX and QBCore)
-----------------------------------------------
-- PBlackMarket - Permissions Configuration
-- Configuration des permissions
-----------------------------------------------
Permissions = {}
-------------------------------------------------
-- ESX Permissions / Permissions ESX
-------------------------------------------------
-- FR: Groupes ESX autorisés à accéder au panel admin
-- EN: ESX groups allowed to access the admin panel
Permissions.ESX = {
allowedGroups = {
'admin',
'superadmin',
'mod'
}
}
-------------------------------------------------
-- QBCore Permissions / Permissions QBCore
-------------------------------------------------
-- FR: Permissions QBCore autorisées à accéder au panel admin
-- EN: QBCore permissions allowed to access the admin panel
Permissions.QBCore = {
allowedPermissions = {
'admin',
'god'
}
}
-- FR: Utiliser les licences Ace Permissions (true) ou les permissions QB internes (false)
-- EN: Use Ace Permissions licenses (true) or internal QB permissions (false)
Permissions.QBCore.useAcePermissions = true
-- FR: Licences Ace Permissions autorisées (seulement si useAcePermissions = true)
-- EN: Allowed Ace Permissions licenses (only if useAcePermissions = true)
-- Example: 'license:abc123', 'steam:110000123456789', 'discord:123456789012345678'
Permissions.QBCore.allowedLicenses = {
--'license:12345',
-- 'steam:110000123456789',
-- 'discord:123456789012345678'
}
-------------------------------------------------
-- Custom Check Function / Fonction de vérification personnalisée
-------------------------------------------------
-- FR: Vous pouvez créer votre propre logique de vérification des permissions ici
-- EN: You can create your own permission check logic here
-- Example for ESX:
-- function Permissions.ESX.CustomCheck(xPlayer)
-- return xPlayer.identifier == 'char1:abc123' or xPlayer.job.name == 'admin'
-- end
-- Example for QBCore:
-- function Permissions.QBCore.CustomCheck(Player, source)
-- return Player.PlayerData.citizenid == 'ABC12345' or Player.PlayerData.job.name == 'police'
-- end
Last updated