From 262811197885ea3d071298a227138d014b670023 Mon Sep 17 00:00:00 2001 From: PenguScripts <102926606+PenguScript@users.noreply.github.com> Date: Mon, 17 Feb 2025 12:43:28 -0500 Subject: [PATCH] Update client.lua --- modules/inventory/codem-inventory/client.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/inventory/codem-inventory/client.lua b/modules/inventory/codem-inventory/client.lua index 6ad452c..b04af5d 100644 --- a/modules/inventory/codem-inventory/client.lua +++ b/modules/inventory/codem-inventory/client.lua @@ -17,6 +17,12 @@ Inventory.GetItemInfo = function(item) return repackedTable end +Inventory.HasItem = function(item) + local itemList = codem:GetItemList() + local itemCheck = itemList and itemList[item] ~= nil + return itemCheck +end + Inventory.GetImagePath = function(item) local imagePath = string.format("nui://codem-inventory/html/images/%s.png", item) return imagePath or "https://avatars.githubusercontent.com/u/47620135" @@ -38,4 +44,4 @@ Inventory.GetPlayerInventory = function() }) end return items -end \ No newline at end of file +end