TriggerEvent('b-inventory:openSecond', data, slotSave)-- It's a client event
function open_secondary()
currentSecondInv = NewSecondInventory({
type = "lager",
name = 'Lager',
slots = 10,
maxWeight = 100,
description = {
text = 'Lager',
icon = 'lager.svg'
},
owner = 'player'
})
currentSecondInv.open({
saveSlots = true
})
end
-- this function below is for testing ofc
function secondar_additem(label, name, count, weight)
currentSecondInv.addItem({
name = name,
label = label,
count = count,
weight = weight
}, {
saveInDb = true
})
end
TriggerEvent("b-inventory:searchPlayer", target_source)