GetInventoryItemById

Gets an inventory item by id


Params

Name
Optional
Example

inventoryId

no

1

itemId

no

1

Usage

local api = exports["bb_inventory"]:GetAPI()

local inventoryItem = api.GetInventoryItemById(1, 1)
local inventoryItem = exports["bb_inventory"]:GetInventoryItemById(1, 1)

print(json.encode(inventoryItem))
-- {
--     "slot": 15,
--     "durability": 100,
--     "item": {
--         "category": "weapon",
--         "weight": 1000,
--         "sizeX": 2,
--         "maxAmount": 1,
--         "label": "Pistol",
--         "sizeY": 2,
--         "name": "weapon_pistol",
--         "id": 601,
--         "type": "WEAPON"
--     },
--     "isHorizontal": true,
--     "metadata": {},
--     "amount": 1,
--     "durability": 100,
--     "itemId": 601,
--     "inventoryId": 13,
--     "id": 73
-- }

Last updated