mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-16 21:46:03 +01:00
Fix ox_inv item client info (images) caching
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user