diff --git a/modules/inventory/ps-inventory/client.lua b/modules/inventory/ps-inventory/client.lua index 6ffcd0a..7e459e2 100644 --- a/modules/inventory/ps-inventory/client.lua +++ b/modules/inventory/ps-inventory/client.lua @@ -26,3 +26,17 @@ Inventory.GetImagePath = function(item) local imagePath = file and string.format("nui://ps-inventory/html/images/%s.png", item) return imagePath or "https://avatars.githubusercontent.com/u/47620135" end + +Inventory.GetItemInfo = function(item) + local itemData = Framework.Shared.Items[item] + if not itemData then return {} end + local repackedTable = { + name = itemData.name, + label = itemData.label, + stack = itemData.unique, + weight = itemData.weight, + description = itemData.description, + image = Inventory.GetImagePath(itemData.name) + } + return repackedTable +end \ No newline at end of file diff --git a/modules/inventory/qb-inventory/client.lua b/modules/inventory/qb-inventory/client.lua index c699953..2507543 100644 --- a/modules/inventory/qb-inventory/client.lua +++ b/modules/inventory/qb-inventory/client.lua @@ -25,3 +25,18 @@ Inventory.GetImagePath = function(item) local imagePath = file and string.format("nui://qb-inventory/html/images/%s.png", item) return imagePath or "https://avatars.githubusercontent.com/u/47620135" end + +Inventory.GetItemInfo = function(item) + local itemData = Framework.Shared.Items[item] + if not itemData then return {} end + local repackedTable = { + name = itemData.name, + label = itemData.label, + stack = itemData.unique, + weight = itemData.weight, + description = itemData.description, + image = Inventory.GetImagePath(itemData.name) + } + return repackedTable +end +