โ๏ธConcepts & How It Works
This guide shows how to create and reuse shop themes in MarketV2. Define visuals (NPC/blip/marker/UI), payments, access rules, and full item catalogs, then style the UI via CSS theme tokens
๐ RISK MARKET V2 โ SHOPS & THEMES
1) Overview
2) Theme Anatomy
Config.MarketThemes = Config.MarketThemes or {}
Config.MarketThemes.mytheme = {
distance = 3.0,
npc = { enabled = true, model = 'a_m_y_business_01' },
blip = { enabled = true, sprite = 52, color = 48, scale = 0.8, name = 'My Themed Shop' },
marker= { enabled = true, type = 29, scale = 0.5, color = { r=255,g=255,b=0,a=150 } },
ui = {
title = 'MY THEME',
description = 'Welcome!',
showStock = true -- show stock to customers on owned shops
},
payment = {
cash = true,
bank = true,
blackmoney = false
-- itemCurrency = { enabled = true, item = 'gold_token', per = 100 }
},
-- Optional access control (jobs/grades):
access = {
jobs = 'all', -- or { 'police','ambulance' }
minGrade = 0,
minGrades = { police = 3 }
},
weaponsAsItems = false, -- false=give to loadout, true=inventory item
-- Optional per-job category gates:
-- categoryAccess = {
-- police = { { minGrade = 2, categories = { 'Restricted' } } }
-- },
categories = {
{ name = 'Snacks', icon = 'img/items/hamburger.png' },
-- { name = 'Restricted', icon = 'img/categories/crown.png' }
},
items = {
Snacks = {
{ name='bread', label='Bread', price={min=10,max=15}, image='img/items/bread.png', description='Fresh loaf.' },
{ name='hamburger', label='Hamburger', price={min=25,max=25}, image='img/items/hamburger.png', description='Juicy & quick.' }
}
-- Restricted = { ... }
}
}Rules
3) Attach Theme to a Shop
4) License System (NEW)
Per-Shop License Configuration
License Modes
Mode
Description
Required Config
Example: Weapon Shop with License
Example: TK-MDT Pistol Shop
TK-MDT Configuration
License Notifications
5) UI Styling (CSS)
6) Payments
Item Currency
QBCore Black Money as Item
7) Ownership, Pricing & Stock
Unowned Shops
Owned Shops
8) Access Control & Weapons
Job/Grade Access (Theme Level)
Weapons
9) Delivery Missions (Owner Restock)
Flow
Configuration
10) Owner Flow (Bank & Procurement)
11) Exports & Events
Server Exports
Core Events
Owner Actions
Delivery Flow
12) Images & Paths
13) ox_target vs. Markers
14) Best Practices
15) Gotchas & Troubleshooting
16) Minimal Example Theme + Shop
Theme
CSS
Shop
17) Weapon Shop License Examples
Example 1: Basic Weapon Shop (Item License)
Example 2: Pistol Shop (TK-MDT)
Example 3: Rifle Shop (ESX)
Example 4: No License Shop
Last updated