Functions
Server
Inventory
GetInventory

Returns the inventory associated with the ID (and owner if defined). Otherwise returns null.

exports.ox_inventory:GetInventory(inv, owner)
  • inv: number or table
  • owner?: string or boolean

Example:

local inventory = exports.ox_inventory:GetInventory('example_stash', false)
print(json.encode(inventory, {indent = true}))
--[[
    {
        "id": "example_stash,
        "label": "Police Stash",
        "type": "stash,
        "slots": 50,
        "weight": 0,
        "maxWeight": 100000,
        "owner": false,
        ...
    }
]]