Customization
Each shop is configured in the panel and stored in your database — see 🏪 Building a shop. The files are for what every shop has in common.
Which file decides what
Section titled “Which file decides what”| File | What it decides | Open? |
|---|---|---|
config.lua | Framework, language, interaction, default ped, command, images, categories, robbery rules, identifiers | Yes |
bridge/server.lua | Money, accounts, items, inventory, jobs, notifications, callbacks, and the custom police alert | Yes |
bridge/client.lua | Notifications, help prompts, player data and callbacks on the client | Yes |
bridge/target.lua | How shopkeepers and shop spots are added to ox_target or qb-target | Yes |
bridge/utils.lua | Reads a player’s identifiers (Steam, licence, Discord, FiveM, Xbox) | Yes |
locales/*.lua | In-game text: notifications, prompts, robbery messages | Yes |
html/locales.js | Text inside the panels and the shop window, for all twelve languages | Readable |
html/index.html, style.css, script.js | The panels and the shop window | Readable |
list/peds.lua | The ped models offered in the panel | Escrowed |
mic_shopcreator.sql | The nine tables, imported once | Yes |
client.lua, server.lua | Shop logic | Escrowed |
config.lua
Section titled “config.lua”General
Section titled “General”| Option | What it does | Default |
|---|---|---|
Config.Locale | The language, in game and in the panels. See Languages | 'en' |
Config.Framework | 'esx' or 'qbcore'. Not detected on its own. On QBox, use 'qbcore' — QBox runs QBCore resources through its compatibility layer | 'esx' |
Config.Command | The command that opens the Shop Creator panel | 'shopcreator' |
Config.IdentifierType | How owners and employees are recognised: 'discord', 'license', 'esx' or 'citizenid'. See Installation | 'discord' |
Shopkeepers and interaction
Section titled “Shopkeepers and interaction”| Option | What it does | Default |
|---|---|---|
Config.Interaction | 'ox_target', 'qb-target' or 'default' (help prompt and E) | 'ox_target' |
Config.RadiusInteract | With 'default', how close in metres a player must be | 2.0 |
Config.SpawnNPC | false places no shopkeepers: a marker (with 'default') or a target sphere marks the spot instead. No shopkeeper also means nobody to rob | true |
Config.DefaultPed | Model used when a location has none, or an invalid one | 'a_f_m_bevhills_01' |
Config.PedSpawnDistance | Shopkeepers exist only while a player is within this many metres | 20.0 |
Products
Section titled “Products”| Option | What it does | Default |
|---|---|---|
Config.Categories | The categories offered when you add a product; the shop window groups products by them | items, weapons, misc |
Config.InventoryImagePath | A list of image folders. For each product the window tries <item name>.png in each folder in turn, and uses the first one that loads | nui://ox_inventory/web/images/ |
Config.AllowEmployeesAddProducts | On owned shops, whether employees may add new products. Owners always can; employees can always manage existing ones | false |
Not on ox_inventory? Point Config.InventoryImagePath at your inventory’s image folder, for example nui://qb-inventory/html/images/. Add a second entry if your images are split across folders.
Robberies
Section titled “Robberies”| Option | What it does | Default |
|---|---|---|
Config.BlacklistWeapons | Meant as the weapons that cannot start a robbery. This version does not read it: any weapon starts one, and only bare hands never do | weapon_unarmed, weapon_nightstick, weapon_stungun |
Config.RobberyNotifyJobs | Jobs alerted when a robbery starts | police |
Config.PoliceAlert | "default" alerts the jobs above with a notification and a blip for a minute. "custom" calls TriggerPoliceAlert in bridge/server.lua instead | "default" |
Config.RobberyCooldown | Fallback cooldown for a shop that has none saved. The code counts it in minutes, like the per-shop field (the comment in config.lua says seconds) | 300 |
Config.TakeRobberyMoneyFromVault | On owned shops, money rewards come out of the shop’s vault — and stop when it is empty | true |
| Option | What it does | Default |
|---|---|---|
Config.Screenshot | Attach a screenshot of the player’s screen to Discord logs. Needs screenshot-basic running | true |
The webhook URL itself is set per shop in the panel, not here.
Commands and permissions
Section titled “Commands and permissions”| Command | Who can use it | What it does |
|---|---|---|
/shopcreator | ACE mic_shop.open | Opens the Shop Creator panel. Renamed with Config.Command, and bindable in FiveM’s key settings like any command |
Shop owners and employees need no permission: the shop window shows them a gear button to Shop Settings when they open a shop they own or work in.
Languages
Section titled “Languages”Twelve languages ship: en, es, fr, de, it, pt, ru, ja, ko, zh-CN, ar and nl. Text lives in two places, and both follow Config.Locale:
locales/<code>.lua— what the game shows: notifications, help prompts, robbery messages.html/locales.js— what the panels and the shop window show, one block per language.
Adding a language:
- Copy
locales/en.luatolocales/<code>.luaand translate the text on the right of each line. Keep the keys and any%s. - Add
locales/<code>.luatoshared_scriptsinfxmanifest.lua, next to the others, so players download it. - In
html/locales.js, copy the'en'block, rename it to your code, and translate it. - Set
Config.Localeto your code,refresh, and restart.
A key your Lua file is missing shows up in game as Translation not found: <key>.
The bridge
Section titled “The bridge”Four open files in bridge/. Keep the function names — the shop code calls them by name.
bridge/server.lua — one block for ESX, one for QBCore, chosen by Config.Framework.
| Function | What it is for |
|---|---|
GetPlayer, GetPlayerJob | The player object and their job |
GetMoney, AddMoney, RemoveMoney | Cash |
GetAccount, AddAccountMoney, RemoveAccountMoney | Named accounts: bank, black_money |
GetInventoryItem, AddInventoryItem, RemoveInventoryItem | Items. Reads through ox_inventory when it is running |
GetPlayerInventory | The owner’s inventory, listed when they stock their shop |
ShowNotification | Server-side notifications |
RegisterServerCallback | Callbacks through ESX or QBCore |
TriggerPoliceAlert(x, y, z, shopLabel) | Called on every robbery when Config.PoliceAlert = "custom". Empty by default — put your dispatch call here |
bridge/client.lua — ShowNotification, ShowHelpNotification, GetPlayerData and TriggerServerCallback. On QBCore, ShowHelpNotification is empty; fill it with your own help-text or draw-text call if you use Config.Interaction = 'default' or want to see the employee invitation prompt.
bridge/target.lua — adds the “open shop” option to each shopkeeper (or to a small sphere when Config.SpawnNPC is off) for ox_target or qb-target, and removes them again when shops change.
Custom police dispatch: set Config.PoliceAlert = "custom" and write your dispatch resource’s alert inside TriggerPoliceAlert in bridge/server.lua. It receives the shopkeeper’s coordinates and the shop’s name.
Exports
Section titled “Exports”Client exports for opening shops from another resource:
| Export | Arguments | What it does |
|---|---|---|
OpenShop | shop ID, location ID | Opens that shop’s window, respecting its cooldown and job restriction |
OpenShopAsEmployee | shop ID, location ID | The same as OpenShop; the Shop Settings gear appears if the player owns or works there |
OpenShopAsOwner | — | Opens the Shop Creator panel, if the player has mic_shop.open |
Target resources can also call the client event mic_shopcreator:client:openShop with shopId and locationId in its data, which is what the built-in target options do. Shop and location IDs are the ones shown in the panel.