mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 14:38:50 +00:00
update inventory server docs
This commit is contained in:
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
|
||||
```
|
||||
```
|
||||
Reference in new issue
Block a user