GetItemInfo fix on ps/qb inventory
This commit is contained in:
1 parent
64d302d0da
commit
6ddbb47e97
2 files changed
+29
No files matched your search
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user