CreateInventory

Creates an Inventory


Params

Name
Optional
Example

identifier

no

police_storage:5

type

no

"STASH"

container

no

police_storage

title

yes

police_storage

icon

yes

police_storage

automaticallyLoad

yes

true/false

Usage

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

local inventory = api.CreateInventory(identifier, "STASH", "police_storage", "police_storage", "police_storage", true)
local inventory = exports["bb_inventory"]:CreateInventory(identifier, "STASH", "police_storage", "police_storage", "police_storage", true)

print(json.encode(inventory))
---{
---    id = 1,
---    title = "default_storage",
---    icon = "default_storage",
---    identifier = "default_storage",
---    type = "PLAYER",
---    items = {},
---    category = "food",
---    sizeX = 6,
---    sizeY = 3,
---    maxWeight = 3000
---}

Last updated