Add delay for checking for inventory items on qb

Custom inventories apparently load items separately/later into qbshared

so the script starts thinking there is definitely 0 items but its checking too early, this forces it to wait until its available to continue
This commit is contained in:
Jim Shield
2025-05-15 15:31:41 +01:00
parent 65137207ae
commit 263d5160aa
2 changed files with 7 additions and 0 deletions

View File

@@ -252,6 +252,7 @@ RegisterNetEvent(getScript()..":server:toggleItem", function(give, item, amount,
else
local amountToAdd = amount or 1
if isStarted(OXInv) then invName = OXInv
jsonPrint(info)
exports[OXInv]:AddItem(src, item, amountToAdd, info, slot)
elseif isStarted(QSInv) then invName = QSInv