feat(ox_inventory): Document Inventory export (#63)

This was missing.
This commit is contained in:
Ehbw2 authored and GitHub committed 2022-10-27 16:25:05 +11:00
1 parent 235f26a0be
commit 6bc0f7dedc
1 file changed
+23
@@ -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,
...
}
]]
```