Update client.lua

This commit is contained in:
PenguScripts authored and GitHub committed 2025-02-17 12:52:37 -05:00
1 parent 665e6be22f
commit 0a141fe2c7
1 file changed
+6
@@ -17,6 +17,12 @@ Inventory.GetItemInfo = function(item)
return repackedTable return repackedTable
end end
Inventory.HasItem = function(item)
local itemCount = ox_inventory:Search('count', item)
local hasItem = itemCount ~= 0
return hasItem
end
Inventory.GetImagePath = function(item) Inventory.GetImagePath = function(item)
local file = LoadResourceFile("ox_inventory", string.format("web/images/%s.png", item)) local file = LoadResourceFile("ox_inventory", string.format("web/images/%s.png", item))
local imagePath = file and string.format("nui://ox_inventory/web/images/%s.png", item) local imagePath = file and string.format("nui://ox_inventory/web/images/%s.png", item)