Fix ox_inv item client info (images) caching

This commit is contained in:
Jim Shield
2025-06-19 22:15:49 +01:00
parent 30de9a2d9c
commit c888aa5ecf
2 changed files with 10 additions and 5 deletions

View File

@@ -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