diff --git a/modules/inventory/ox_inventory/client.lua b/modules/inventory/ox_inventory/client.lua index 3f1c239..dc2f1d0 100644 --- a/modules/inventory/ox_inventory/client.lua +++ b/modules/inventory/ox_inventory/client.lua @@ -17,6 +17,12 @@ Inventory.GetItemInfo = function(item) return repackedTable end +Inventory.HasItem = function(item) + local itemCount = ox_inventory:Search('count', item) + local hasItem = itemCount ~= 0 + return hasItem +end + Inventory.GetImagePath = function(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) @@ -27,4 +33,4 @@ Inventory.GetPlayerInventory = function() return exports.ox_inventory:GetPlayerItems() end ---Bridge.RegisterModule("Inventory", Inventory) \ No newline at end of file +--Bridge.RegisterModule("Inventory", Inventory)