Installation

Dependencies

QBCore Framework qb-target or ox_target qb-inventory (Custom Inventory possible)


How to install

Go to qbcore/server/player.lua Find the function QBCore.Player.CheckPlayerData

Under the function add the following line:

PlayerData.metadata['motelroom'] = PlayerData.metadata['motelroom'] or nil

Now it should look like this:

ESX

Add this to ox_inventory/data/stashes.lua

{
	coords = vec3(151.23, -1003.14, -99.0),
	target = {
	loc = vec3(151.23, -1003.14, -99.0),
	length = 0.6,
	width = 1.8,
	heading = 340,
	minZ = 43.34,
	maxZ = 44.74,
	label = 'Open Motel Stash'
	},
	name = 'motel_stash',   -- Do not change this
	label = 'Motel Stash',
	owner = true,
	slots = 70,
	weight = 70000,
},

Custom Inventory

Example for QBCore & ESX users which are using a different inventory. Config.UseQBInventory =false

Config.UseOXInventory =false

Now you can create your own shop with your inventory and open the shop via a export in the config.lua

Config.UseQBInventoryStash = false       -- If false you can use your own stash export/event below
Config.CustomInventoryStash = function()
    -- Add your own export/event here
    -- EXAMPLE:
    -- exports.ox_inventory:openInventory('stash', {id='TestStash'})    -- "TestStash" needs to be registered in yourinventory/data/stashes.lua
    -- exports.ox_inventory:openInventory('stash', 1)                   -- Open the first stash in data/stashes.
end

Last updated