update inventory server docs

This commit is contained in:
Luke committed 2022-11-17 11:59:10 +01:00
1 parent c013d3ff0c
commit 4dbd9dd4ab
21 files changed
+112 -91

No files matched your search

@@ -3,12 +3,14 @@ Returns true or false depending if the inventory can carry the specified item.
The function checks for inventory weight and available slots.
```lua
-- inv: string or number
-- item: table or string
-- count: number
-- metadata: table or string (optional)
exports.ox_inventory:CanCarryItem(inv, item, count, metadata)
```
* inv: `string` or `number`
* item `table` or `string`
* Can be array of items.
* count: `number`
* metadata?: `table` or `string`
* If metadata is passed as string then `metadata.type` will be checked.
**Example:**
```lua
@@ -18,4 +20,4 @@ if exports.ox_inventory:CanCarryItem(source, 'water', 3) then
else
-- Do stuff if can't carry
end
```
```