Installation
Ten minutes: one SQL file, one permission, and three lines of config.lua worth checking.
Before you start
Section titled “Before you start”| You need | Why |
|---|---|
| ESX, QBCore or QBox | Money, jobs, items and notifications come from the framework |
| oxmysql | Everything the shops remember is in your database |
| ox_target or qb-target | Optional. ox_target is the default; without either, players get a help prompt and press E |
| screenshot-basic | Optional, for screenshots on Discord logs. Needed if you leave Config.Screenshot on |
1. Put the folder in place
Section titled “1. Put the folder in place”Download mic_shopcreator from your Cfx.re granted assets and drop the folder into your resources, for example resources/[mic]/mic_shopcreator.
2. Start it after the things it leans on
Section titled “2. Start it after the things it leans on”In server.cfg, ensure mic_shopcreator goes below oxmysql, your framework (es_extended, qb-core or qbx_core), your inventory, your target resource and screenshot-basic.
It worked when the resource starts with no red lines, and no Locale file not found message.
3. The database
Section titled “3. The database”Import mic_shopcreator.sql once. It creates nine tables:
| Table | What it holds |
|---|---|
mic_shopcreator | The shops, with their blip, job, robbery, ownership and webhook settings |
mic_shopcreator_locations | Where each shopkeeper stands, its model, its clothes, and when it was last robbed |
mic_shopcreator_products | Products of shops the server runs |
mic_shopcreator_owner_products | Products of player-owned shops, with their stock |
mic_shopcreator_jobs | Which jobs and grades may use a shop |
mic_shopcreator_rewards | What a robbery pays out |
mic_shopcreator_owners | Who owns which shop |
mic_shopcreator_employees | Who works where, their commission and their personal vault |
mic_shopcreator_vaults | Each owned shop’s clean and black-money balance |
Updating from an older version? You do not need update.sql: on every start the resource checks for the columns added since (clothes on locations, min_amount and max_amount on rewards) and adds them if they are missing. The console says Added clothes column to mic_shopcreator_locations table. the one time it does.
4. Items
Section titled “4. Items”None of its own. A shop sells items that already exist in your inventory — you type their names when you add a product. Product pictures come from your inventory’s image folder, see step 5.
5. Framework, target and images
Section titled “5. Framework, target and images”Open config.lua and check:
| Option | Set it to |
|---|---|
Config.Framework | 'esx' (the default) or 'qbcore'. It is not detected on its own. On QBox, use 'qbcore' — QBox runs QBCore resources through its compatibility layer |
Config.Interaction | 'ox_target' (the default), 'qb-target' or 'default' (help prompt and E) |
Config.InventoryImagePath | Where your inventory keeps item pictures. Ships pointing at nui://ox_inventory/web/images/ |
Config.IdentifierType | How owners and employees are recognised. Ships as 'discord'; see below |
Config.IdentifierType decides what goes into the owner list and what the employee table stores:
| Value | Players are recognised by | Use it when |
|---|---|---|
'discord' | Their Discord ID, the number without discord: | Everyone connects with Discord linked |
'license' | Their Rockstar licence, the full license:… | You do not require Discord |
'esx' | ESX’s own identifier, character prefix included | ESX with multicharacter, so each character owns separately |
'citizenid' | The QBCore citizen ID | QBCore or QBox, so each character owns separately |
Pick it before anybody owns or works in a shop. Changing it later means re-entering every owner, and existing employees will no longer be recognised.
6. Give yourself the panel
Section titled “6. Give yourself the panel”The panel is locked behind the ACE permission mic_shop.open (not mic_shopcreator.open). Grant it in server.cfg with an add_ace line — to one person, for example add_ace identifier.discord:YOUR_DISCORD_ID mic_shop.open allow, or to a group, for example add_ace group.admin mic_shop.open allow.
It worked when /shopcreator opens the Shop Creator. Without the permission you get the “no permission” notification.
7. First test
Section titled “7. First test”/shopcreator, create a shop, and give it a name.- Add a location. A preview of the shopkeeper follows where you look: mouse wheel turns it, ↑ / ↓ raise and lower it, E places it, X cancels.
- Add a product: an item that exists in your inventory, a price, a category and a payment type. Save.
It worked when the shopkeeper is standing where you placed it, talking to it opens the shop with your product and its picture, and buying it takes the money and gives the item.
Before you open your city
Section titled “Before you open your city”Config.IdentifierTypeis final. Decide it now; owners and employees are stored by it.- Only admins have
mic_shop.open. It can create, edit and delete every shop. - Leave
Config.Screenshoton only ifscreenshot-basicruns. Otherwise logs will not send. - Robbery cooldowns are set per shop, in minutes — set one on every shop you make robbable.
- Buy something on a normal character in each job-restricted shop, to check the grade you set.