Merge pull request #17 from tr1ckz/patch-1

CanCarryAmount.md
This commit is contained in:
Linden authored and GitHub committed 2022-04-25 00:08:48 +10:00
commit 4bf110d26d
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)
```