🛠️Setup
This is a detailed setup guide for Modern Shops. If you have any questions before making a purchase, you can contact us on Discord
Supports: QBCore QBOX, ESX, Custom Frameworks
Configuration Guide
This guide will walk you through the configuration options
General Settings

This section covers general settings for the shops.
- Config.Settings.Interaction:- useTextUI: Set to- trueto use a text-based UI for interactions.
- openKey: The key used to open the shop when using TextUI. The default is- 38(E key).
- useTarget: Set to- trueto use a target system for interactions.
- Target: Specify the target system you are using (e.g.,- 'qb-target'or- 'ox_target').
 
- Config.Settings.AllItemsTab:- Enable: Set to- trueto include an "All Items" tab in the shops.
- categoryName: The name of the "All Items" category (e.g.,- 'All Items').
- categoryLogo: The Font Awesome icon for the "All Items" category (e.g.,- 'fa-globe').
 
- Config.Settings.stockFeature: Set to- trueto enable the item stock feature. If enabled, items can run out of stock.
- Config.Settings.useInventoryImage: Set to- trueto use images from your inventory folder. If- false, it will fetch images from- cs_shops/ui/image.
- Config.Settings.EnableSearch: Set to- trueto enable the search feature in shops.
- Config.Settings.EnableMouseControl: Set to- trueto enable mouse controls in the UI.
- Config.Settings.maxPurchaseAmount: The maximum amount of an item that can be purchased at once. The default is- 100.
Products
This section allows you to define the items that can be purchased in the shops. Items are organised into categories.
Here's an example of a single item entry:
{
    item = 'tosti',         -- The item's spawn name
    itemName = "Tosti",     -- The item's display name
    itemStock = 50,         -- The available stock of the item
    itemPrice = 2,          -- The price of the item
    itemInfo = "Delicious grilled sandwich", -- A description of the item
    --  OPTIONAL --
    itemMetaData = {},         -- For item metadata
    requiredJob = false,       -- Restrict to jobs and grades (e.g., {['police'] = {1,2}, ['taxi'] = {1}})
    requiredGang = false,      -- Restrict to gangs and grades (QB-Core only) (e.g., {['ballas'] = {1,2}, ['lostmc'] = {1}})
    requiredLicense = false    -- Require a specific license (e.g., {'weapon', 'driver'})
},You can create multiple categories, such as normal, liquor, hardware, weapons, ammo, etc., and add items to each category.
Sell Categories
This section is where you define the items that players can sell.
- Config.SellCategories: This table contains categories of sellable items. For each item, you set the price it can be sold for.
Example:
Config.SellCategories = {
    ['electronics'] = {
        categoryName = "Electronics",
        categoryLogo = "fa-solid fa-microchip",
        items = {
            ['phone'] = 425,
            ['radio'] = 125,
        }
    },
    -- ... other categories
}Shops
This is where you define the actual shop locations and their properties.
Here's an example of a shop configuration:
[1] = {
    ShopName = 'General Store',
    shopType = 'both',  -- 'buy', 'sell', or 'both'
    Category = {
        [1] = 'normal',
        [2] = 'liquor',
    },
    SellCategory = {
        [1] = 'electronics',
        [2] = 'tools',
    },
    Locations = {
        vector4(24.47, -1346.62, 29.5, 271.66),
        -- ... other locations
    },
    Interaction = {
        targetIcon = 'fas fa-shopping-basket',
        targetLabel = 'Open General Store',
        spawnPed = 'mp_m_shopkeep_01',
        scenario = 'WORLD_HUMAN_STAND_MOBILE',
        radius = 2.5,
    },
    Blips = {
        Enable = true,
        blipsprite = 52,
        blipscale = 0.6,
        blipcolor = 0,
    }
},- ShopName: The name of the shop.
- shopType: Can be- 'buy',- 'sell', or- 'both'.
- Category: A table defining the product categories available in this shop.
- SellCategory: A table defining which sell categories this shop accepts.
- Locations: A table of- vector4coordinates for each shop location.
- Interaction:- targetIcon: The icon for the target system.
- targetLabel: The label that appears on the target.
- spawnPed: The ped model to spawn at the shop. Set to- falseif no ped is needed.
- scenario: The animation scenario for the ped.
- radius: The interaction radius.
 
- Blips:- Enable: Set to- trueto show a map blip for the shop.
- blipsprite,- blipscale,- blipcolor: Blip properties.
 
Webhook Logging

You can set up a Discord webhook to log shop transactions (cs_shops/config/functions/sv_function.lua)
- Config.Webhook.enabled: Set to- trueto enable webhook logging.
- Config.Webhook.url: Your Discord webhook URL.
- Config.Webhook.username: The username that will appear in the webhook.
- Config.Webhook.purchase: Settings for purchase logs, including- embedColorand- title.
- Config.Webhook.sell: Settings for sell logs, including- embedColorand- title.
Additional detailed guidance can be found in the config itself. If you need further assistance, please feel free to contact us on Discord.
Last updated
