From 6bc0f7dedcc8ba257ddd0670be9999617304c9b4 Mon Sep 17 00:00:00 2001 From: Ehbw2 Date: Thu, 27 Oct 2022 06:25:05 +0100 Subject: [PATCH] feat(ox_inventory): Document Inventory export (#63) This was missing. --- .../Functions/Server/Inventory/Inventory.md | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 docs/ox_inventory/Functions/Server/Inventory/Inventory.md diff --git a/docs/ox_inventory/Functions/Server/Inventory/Inventory.md b/docs/ox_inventory/Functions/Server/Inventory/Inventory.md new file mode 100644 index 00000000..2b849f09 --- /dev/null +++ b/docs/ox_inventory/Functions/Server/Inventory/Inventory.md @@ -0,0 +1,23 @@ +Returns the inventory associated with the ID (and owner if defined). Otherwise returns null +```lua +---@param id number | table +---@param owner string | boolean (optional) +exports.ox_inventory:Inventory(id, owner) +``` +Example: +```lua +local inventory = exports.ox_inventory:Inventory('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, + ... + } +]] +```