CanPlayerCarry
note
ONLY serverside
Parameters
| Parameter | Description |
|---|---|
| xPlayer | ESX Player from ESX.GetPlayerFromId(source) |
| item | Object with type & name |
| count | Item count as a number |
Example
RegisterCommand('CanPlayerCarry', function(source, args, raw)
local src = source
local xPlayer = ESX.GetPlayerFromId(src)
local canCarryItem = exports.inventory:CanPlayerCarry(xPlayer, {type = 'item_standard', name = 'apple'}, 10)
local canCarryWeapon = exports.inventory:CanPlayerCarry(xPlayer, {type = 'item_weapon', name = 'WEAPON_PISTOL'})
print(canCarryItem)
print(canCarryWeapon)
end)