Shop System

The package that you have obtained from your keymaster includes both qs-inventory and qs-shops, the latter is an exclusive stores addon for qs-inventory. Here we can create stores with different dependencies on licenses or items and even with customizable jobs and degrees.

Make sure to create each vendor with items that you have integrated into your qs-inventory/shared/items.lua in case of esx or qb-core/shared/items.lua in case of qbcore.

Follow the thousands of examples within qs-shops/config/config.lua to fully understand the system. There you will find examples and general guides.

Can I still use qb-shops in case of qbcore?

Yes, of course, qs-shops or qb-shops are very similar systems which fulfill the same function, but qs-shops brings thousands of extra configurations that you can take advantage of.


Basic use of shops

The simple use is through the qs-shops asset, which has multiple stores. We can also use other stores as long as they do not search for items in your SQL. If this is the case, we will have to ask the creator for certain modifications.

If you were using Quasar Inventory, we recommend using qs-shops or qb-shops to run the stores. If you use a third party one, we cannot take care of such situation.


Integration of shops in other assets

You can also make use of the integration of stores in other assets in a simple way, we will leave an example using command of its basic use, then you yourself can easily integrate it as portable stores or static stores using loops on the client side.

RegisterCommand('openshop', function()
    local shop = 'shop'
    local Items = {
        label = 'Simple Shop',
        items = {
            {
                name = "water_bottle",
                amount = 99,
                price = 15,
                slot = 1
            },
            {
                name = "tosti",
                amount = 99,
                price = 25,
                slot = 2
            },
        },
    }
    TriggerServerEvent("inventory:server:OpenInventory", "shop", "Itemshop_" .. shop, Items)
end)

Last updated