- Download source files from github
- Drag source files into your resources folder
- Rename folder from
qb-inventory-withdecay-main
toqb-inventory
you need to add a decay and created value in your qb-core/shared/items for all items, the decay is set to be the days the item lasts
["created"] = nil
["decay"] = 28.0 -- for 28 days
TriggerServerEvent("QBCore:Server:AddItem, item, 1)
exports['qb-inventory']:toggleItem(1, itemName, 1)
TriggerServerEvent("QBCore:Server:RemoveItem, item, 1)
exports['qb-inventory']:toggleItem(0, itemName, 1)
QBCore.Functions.TriggerCallback('QBCore:HasItem', function(result)
if hasitem then
-- Has Item
end
end, "sandwich")
if QBCore.Functions.HasItem("sandwich") then
-- Has Item
end