From da2e8cf01834f867e0fd696098d95b2a2ec0860d Mon Sep 17 00:00:00 2001 From: tr1ckz <48994713+tr1ckz@users.noreply.github.com> Date: Sat, 23 Apr 2022 19:16:29 -0400 Subject: [PATCH] CanCarryAmount.md Fill in the missing doc for the new export. --- .../Functions/Server/Inventory/CanCarryAmount.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 docs/ox_inventory/Functions/Server/Inventory/CanCarryAmount.md diff --git a/docs/ox_inventory/Functions/Server/Inventory/CanCarryAmount.md b/docs/ox_inventory/Functions/Server/Inventory/CanCarryAmount.md new file mode 100644 index 00000000..42a0ce03 --- /dev/null +++ b/docs/ox_inventory/Functions/Server/Inventory/CanCarryAmount.md @@ -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) +```