mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-18 06:26:01 +01:00
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:
@@ -87,6 +87,12 @@ elseif isStarted(QBExport) then
|
||||
itemResource = QBExport
|
||||
Core = Core or exports[QBExport]:GetCoreObject()
|
||||
Items = Core and Core.Shared.Items or nil
|
||||
CreateThread(function()
|
||||
while not Items or not next(Items) do
|
||||
Items = exports[QBExport]:GetCoreObject().Shared.Items
|
||||
Wait(1000)
|
||||
end
|
||||
end)
|
||||
if isStarted(QBExport) and not isStarted(QBXExport) then
|
||||
RegisterNetEvent('QBCore:Client:UpdateObject', function()
|
||||
Core = Core or exports[QBExport]:GetCoreObject()
|
||||
|
||||
Reference in New Issue
Block a user