ox_inventory icon indicating copy to clipboard operation
ox_inventory copied to clipboard

Create a custom shop is not working.

Open MaDHouSe79 opened this issue 1 year ago • 0 comments

Hello, I'm trying to create a custom shop, but I think it's not working, or I'm doing something wrong.

I have this in a server.lua file, but it won't load the store. if I put the same settings in data/shops.lua, it works. but I want to make it outside the inventory, is this possible? If so, how can I do that?

if Config.Inventory == "ox_inventory" then
    exports.ox_inventory:RegisterShop('TestShop', {
        name = 'Test shop',
        inventory = {
            { name = 'weapon_pistol', price = 5000, metadata = { registered = false	}, currency = 'black_money' },
            { name = 'ammo-9', price = 100, metadata = { registered = false	}, currency = 'black_money' },
	    { name = 'armour', price = 1000, currency = 'black_money' },
	    { name = 'lockpick', price = 100, currency = 'black_money' },
        },
        locations = {
            vec3(171.1488, -993.5358, 30.05),
        },
        groups = {
            unemployed = 0,
            gang = 0,
        },
    })
end

MaDHouSe79 avatar Feb 20 '24 00:02 MaDHouSe79