CBA_fnc_addMagazineVerified

Description

Add magazines to the unit, but verify that it was successful and doesn’t over-burden the recipient.

The function has to options to fill all available inventory slots with the requested magazine type, create excess magazines on the ground or do nothing.

Parameters

_unitthe unit to add magazine too.  [Object]
_magazinethe magazine type to add.  [String]
_action0 (default) do nothing, return false
  • 1 create excess magazines on ground
  • 2 fill all inventory slots

Returns

true, if the unit has sufficient inventory space for the magazine in question

Examples

[player, "SmokeShell",1] call CBA_fnc_AddMagazineVerified

Author

Sickboy, Killswitch, Wolffy.Au

Close