export GetInventoryItems standard, add export GetItemBySlot
This commit is contained in:
1 parent
1d23d256c0
commit
0c90d659a0
14 files changed
+210
-41
No files matched your search
@@ -1,8 +1,10 @@
|
||||
if GetResourceState('codem-inventory') ~= 'started' then return end
|
||||
Inventory = Inventory or {}
|
||||
|
||||
local codem = exports['codem-inventory']
|
||||
|
||||
Inventory.GetItemInfo = function(item)
|
||||
local itemData = exports['codem-inventory']:GetItemList()
|
||||
local itemData = codem:GetItemList()
|
||||
if not itemData[item] then return {} end
|
||||
local repackedTable = {
|
||||
name = itemData.name or "Missing Name",
|
||||
@@ -18,4 +20,4 @@ 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"
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user