mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 22:22:46 +00:00
CanCarryAmount.md
Fill in the missing doc for the new export.
This commit is contained in:
1 parent
43f8625fa5
commit
da2e8cf018
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