From 64540c4c3131f9e0af153d63b658d60fea72938f Mon Sep 17 00:00:00 2001 From: gononono64 <96976330+gononono64@users.noreply.github.com> Date: Mon, 21 Apr 2025 04:54:35 -0500 Subject: [PATCH] too many iteminfos --- modules/inventory/ox_inventory/server.lua | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/modules/inventory/ox_inventory/server.lua b/modules/inventory/ox_inventory/server.lua index a195b31..f277fa0 100644 --- a/modules/inventory/ox_inventory/server.lua +++ b/modules/inventory/ox_inventory/server.lua @@ -124,23 +124,6 @@ Inventory.OpenStash = function(src, id, label, slots, weight, owner, groups, coo TriggerClientEvent('ox_inventory:openInventory', src, 'stash', 'stash_' .. id) end ----This will get the data about an item such as name, label, stack, weight, description and image. ----@param item string ----@return table -Inventory.GetItemInfo = function(item) - local itemData = ox_inventory:Items(item) - if not itemData then return {} end - local repackedTable = { - name = itemData.name or "Missing Name", - label = itemData.label or "Missing Label", - stack = itemData.stack or "true", - weight = itemData.weight or "0", - description = itemData.description or "none", - image = itemData.client and itemData.client.image or Inventory.GetImagePath(item), - } - return repackedTable -end - ---This will set the metadata of an item in the inventory. ---@param src number ---@param item string @@ -167,6 +150,7 @@ end ---@return string Inventory.GetImagePath = function(item) item = Inventory.StripPNG(item) + print(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) return imagePath or "https://avatars.githubusercontent.com/u/47620135"