diff --git a/frameworkCache.lua b/frameworkCache.lua index 84643f7..b92c2be 100644 --- a/frameworkCache.lua +++ b/frameworkCache.lua @@ -87,11 +87,7 @@ if checkExists(Exports.OXInv) then for k, v in pairs(Items) do if k:find("WEAPON") then Items[k:lower()] = Items[k] - Items[k:lower()].image = k..".png" end - Items[k].image = (v.client and v.client.image) and v.client.image:gsub("nui://"..Exports.OXInv.."/web/images/", "") or k..".png" - Items[k].hunger = v.client and v.client.hunger - Items[k].thirst = v.client and v.client.thirst end elseif checkExists(Exports.QBExport) then diff --git a/shared/coreloader.lua b/shared/coreloader.lua index 1ce8f57..e0dc332 100644 --- a/shared/coreloader.lua +++ b/shared/coreloader.lua @@ -98,6 +98,15 @@ else } end end - + if isStarted(OXInv) then + for k, v in pairs(Items) do + local tempInfo = exports[OXInv]:Items(v.name) + if tempInfo.client then + Items[k].image = (tempInfo.client and tempInfo.client.image) and tempInfo.client.image:gsub("nui://"..OXInv.."/web/images/", "") or k..".png" + Items[k].hunger = tempInfo.client and tempInfo.client.hunger + Items[k].thirst = tempInfo.client and tempInfo.client.thirst + end + end + end end) end