Config

This section provides a detailed explanation of all configuration options available in the script. Each setting can be customized to fit your server’s requirements.

General Config
sm_blackmarket/config.lua
Config = {}

Config.Debug = false

-- Category translations
Config.Categories = {
    weapons = "Weapons",
    melee = "Melee Weapons",
    parts = "Weapon Parts",
    ammo = "Ammunition",
    items = "Items",
    attachments = "Weapon Attachments",
    instructions = "Instructions",
    default = "Other"
}

-- Category order in UI
Config.CategoryOrder = {
    "items",
    "melee",
    "ammo",
    "parts",
    "attachments",
    "weapons",
    "instructions"
}

Config.PaymentAccount = 'money' -- set this to the one which you want to use for players to pay at dealer

Config.PurchaseCooldown = 1 -- how often player can buy from dealer (in minutes)
-- set to nil to disable

-- time in minutes how often it will update (randomized)
Config.Update_Interval = {120,150} -- update is every 120 - 150 minutes

Config.ImagePath = 'nui://ox_inventory/web/images/' -- folder where item images are located at

-- how long to wait for npc to appear at dealer spot after ordering from blackmarket menu
Config.Wait = {1,1} -- SET TO NIL TO DISABLE
-- time in seconds
-- its math.random

-- how long npc will stay at pickup location after ordering and Config.Wait has gone
Config.StayAtLocation = {5,8} -- SET TO NIL AND ITS THERE UNTIL RELOG
-- time in minutes
-- its math.random

Config.RobberyChance = { -- settings for npc robbery chance at 
	chance = 0, -- chance for ped to rob player and flee from scene %
	amount = {100,300}, -- how much npc can rob from player
	account = 'money', -- will be taken from money

}

Config.lb_phone = false -- set to true if using lb-phone and want to send the coords via message

Config.StaticPoints = { -- if you wish to use static peds for blackmarket
	{
		coords = vector4(-36.4414, -2688.6548, 5.0002, 91.7715),
		model = 'cs_zimbor',
		type = 'ped',
		pickup = false, -- true = then it will send locations to dealer for order / false = it will give items instantly
		targetTitle = 'Open blackmarket',
		icon = 'fa-brands fa-usb',
	},
	--[[
	{
		coords = vector4(2061.9429, 3173.3447, 45.013, 243.8801),
		model = 'p_cs_laptop_02',
		type = 'object',
		pickup = true, -- true = then it will send locations to dealer for order / false = it will give items instantly
		targetTitle = 'Open blackmarket',
		icon = 'fa-brands fa-usb',
	},]]
	
}

Config.GlobalEntities = {
	enable = true,
	targetTitle = 'Open blackmarket',
	icon = 'fa-brands fa-usb',
	item = 'usb_device', -- item needed / set to nil to disable
	pickup = true, -- true = it will send location via gps to dealer for order pickup / false = it will give items instantly
	models = {
		'bkr_prop_clubhouse_laptop_01b', 
		'v_ind_ss_laptop', 
		'hei_prop_hst_laptop', 
		'p_laptop_02_s', 
		'prop_laptop_01a', 
		'prop_laptop_lester2', 
		'prop_laptop_lester', 
		'prop_laptop_jimmy',
		'prop_phonebox_01b',
	}
}


Config.PickupDealer = {
	models = { -- will spawn one of the models from the table
		'g_m_y_lost_03',
	},
	targetTitle = 'Purchase products',
	icon = 'fa-solid fa-gun',
}

-- places where dealer can spawn to pickup order at
Config.PickupLocations = {
	vector4(1861.9056, 3857.0510, 36.2716, 287.4731),
	-- purchased version has 12 preconfigured locations
}

Config.UI = {
	backgroundColor = "#2d2d2d",
	titleColor = "#28a745",
	titleSize = 2,
	categoryTabBackground = "#44c963",
	categoryTabHover = "#33b852",
	itemBackground = "#1c1c1c",
	itemHover = "#242424",
	scrollbarTrack = "rgba(28, 28, 28, 0.5)",
	scrollbarThumb = "#28a745",
	scrollbarThumbHover = "#2fd151",
	title = "ONION BROWSER",
	currency = "€",
	stock_label = "Stock:",
	price_label = "Price:",
	buy_button = "Buy",
	close_button = "Close",
	confirm_purchase = "Confirm Purchase",
	confirm_question = "Do you want to buy:",
	confirm_question_onped = "Do you want to buy: %s, amount: %s, total: %s%s?",
	total_price = "Total price",
	yes = "Yes",
	no = "No",
	error = "Error",
	ok = "OK",
	in_stock = "In stock",


	-- Login screen texts and colors
	login_title = "ONION BROWSER",
	login_title_color = "#28a745",
	logging_text = "Logging...",
	access_allowed = "Access allowed",
	access_rejected = "Access rejected",
	login_status_color = "#28a745",
	login_error_color = "#dc3545",
	fingerprint_color = "#28a745",
	fingerprint_hover_color = "#2fd151",
	fingerprint_glow_color = "rgba(40, 167, 69, 0.3)",
	fingerprint_bg_color = "rgba(40, 167, 69, 0.1)",
	fingerprint_bg_hover_color = "rgba(40, 167, 69, 0.15)"
}
Stock Configuration
Config.Items = {
    
	weapons = { -- category (make sure its in Config.Categories)
        ['WEAPON_PISTOL'] = { -- item name for inventorys
            label = 'Pistol', -- label for UI
            price = {min = 75000, max = 129000}, -- the price that will be generated
            stock = 1, -- stock that will be generated
            chance = 1 -- the chance for the item to generate on each cycle
        }
    },
	
    melee = { -- category (make sure its in Config.Categories)
        ['WEAPON_BAT'] = { -- item name for inventorys
            label = 'Baseball Bat', -- label for UI
            price = {min = 13000, max = 28000}, -- the price that will be generated
            stock = {min = 1, max = 2}, -- stock that will be generated
            chance = 100 -- the chance for the item to generate on each cycle
        },
		
		['WEAPON_GOLFCLUB'] = { -- item name for inventorys
            label = 'Golf club', -- label for UI
            price = {min = 13000, max = 28000}, -- the price that will be generated
            stock = {min = 1, max = 2}, -- stock that will be generated
            chance = 100 -- the chance for the item to generate on each cycle
        },
		
		['WEAPON_KNIFE'] = { -- item name for inventorys
            label = 'Knife', -- label for UI
            price = {min = 13000, max = 28000}, -- the price that will be generated
            stock = {min = 1, max = 2}, -- stock that will be generated
            chance = 100 -- the chance for the item to generate on each cycle
        },
		
		
    }

}

Last updated