GetItemInfo fix on ps/qb inventory

This commit is contained in:
MrNewb committed 2025-04-10 07:04:15 -04:00
1 parent 64d302d0da
commit 6ddbb47e97
2 files changed
+29

No files matched your search

+14
View File
@@ -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
+15
View File
@@ -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