mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 06:28:54 +00:00
19 lines
427 B
Plaintext
19 lines
427 B
Plaintext
Returns the amount a player can hold based on available weight.
|
|
|
|
```lua
|
|
exports.ox_inventory:CanCarryAmount(inv, item)
|
|
```
|
|
|
|
* inv: `table` or `string` or `number`
|
|
* item: `table` or `string`
|
|
* Can be array to check multiple items.
|
|
|
|
Example:
|
|
|
|
```lua
|
|
-- Checks how much you can carry
|
|
amountToAdd = exports.ox_inventory:CanCarryAmount(inv, 'stone')
|
|
-- Adds the amount
|
|
exports.ox_inventory:AddItem(inv, 'stone', amountToAdd)
|
|
```
|