mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-03 14:38:49 +00:00
1 file changed
+16
@@ -0,0 +1,16 @@
|
|||||||
|
Returns the amount a player can hold based on available weight.
|
||||||
|
|
||||||
|
```lua
|
||||||
|
---@param inv string | number
|
||||||
|
---@param item table | string
|
||||||
|
exports.ox_inventory:CanCarryAmount(inv, item)
|
||||||
|
```
|
||||||
|
|
||||||
|
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)
|
||||||
|
```
|
||||||
Reference in new issue
Block a user