Returns true or false depending if the inventory can carry the specified item.
The function checks for inventory weight and available slots.
exports.ox_inventory:CanCarryItem(inv, item, count, metadata)- inv:
tableorstringornumber - item
tableorstring- Can be array of items.
- count:
number - metadata?:
tableorstring- If metadata is passed as string then
metadata.typewill be checked.
- If metadata is passed as string then
Example:
-- Checks if the player calling the event can carry 3 water items
if exports.ox_inventory:CanCarryItem(source, 'water', 3) then
-- Do stuff if can carry
else
-- Do stuff if can't carry
end