Client inventory
Read the local inventory, open stashes and synchronize clothing from client-side resources.
API reference
5 exportsInventory exports
Access and control the local player's inventory.
GetInventoryItems()Returns every item in the local inventory.
None
InventoryItem[]GetItemBy(findBy)Returns one local inventory item matching the supplied search options.
findBytableInventoryItemGetWeight()Returns the current weight of the local inventory.
None
numberOpenStash(inv)Opens the specified stash.
invstring—ReloadClothes()Reloads the player clothing managed by the inventory.
None
—The findBy table can filter by name, itemHash, x, y, isWeared and meta.
Configuration
Find a local item
Search the local inventory by item name and metadata.
local res = exports["grid_inventory"]:GetItemBy({
name = "backpack",
meta = {
drawable = 40
}
})
print(json.encode(res, {indent=true}))
Clothing synchronization
Use ReloadClothes after another resource has finished applying a different player skin.
Target integrations
An eye-targeting resource can call OpenStash to open stash inventories such as shelves.