From 0a141fe2c7a0bc4d05a61fd3746da8634e3e9ae7 Mon Sep 17 00:00:00 2001 From: PenguScripts <102926606+PenguScript@users.noreply.github.com> Date: Mon, 17 Feb 2025 12:52:37 -0500 Subject: [PATCH] Update client.lua --- modules/inventory/ox_inventory/client.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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)