📥 Trays

Setting up trays for everyone to access is extremely easy. Just make sure that the ID is unique (this will be linked to targeting and stash)

Config.Trays = {
    ["1"] = {	id = "bs_tray1", location = vector3(-1196.95, -892.66, 13.98), width = 0.5, depth = 0.5, heading = 348.85, minz = 13.8, maxz = 14.2, distance = 1, icon = "far fa-clipboard", label = "Open Tray", maxweight = 10000, slots = 50, stash_label = "Tray"}, 
    ["2"] = {	id = "bs_tray2", location = vector3(-1194.9, -893.39, 14.01), width = 0.5, depth = 0.5, heading = 348.85, minz = 13.8, maxz = 14.2, distance = 1, icon = "far fa-clipboard", label = "Open Tray",maxweight = 10000, slots = 50, stash_label = "Tray"},
    ["3"] = {	id = "bs_tray3", location = vector3(-1192.83, -893.83, 13.98), width = 0.5, depth = 0.5, heading = 348.85, minz = 13.8, maxz = 14.2, distance = 1, icon = "far fa-clipboard", label = "Open Tray",maxweight = 10000, slots = 50, stash_label = "Tray"},
    ["4"] = {	id = "bs_tray4", location = vector3(-1190.87, -894.34, 13.98), width = 0.5, depth = 0.5, heading = 348.85, minz = 13.8, maxz = 14.2, distance = 1, icon = "far fa-clipboard", label = "Open Tray",maxweight = 10000, slots = 50, stash_label = "Tray"},
}

For those not using the latest QB-Inventory

You will also have to modify the file HapticLib/server/functions/stash.lua to make it work with your inventory.

RegisterServerEvent("HapticLib:Server:DynamicStash")
RegisterNetEvent('HapticLib:Server:DynamicStash', function(id, slots, weight, label)
	local src = source
	local Player = QBCore.Functions.GetPlayer(src)
	local datas = { label = label, maxweight = weight, slots = slots }
	exports['qb-inventory']:OpenInventory(source, id, datas)
end)

Last updated