CBA_fnc_removeMagazineCargo

Description

Removes specific magazine(s) from cargo space.

Parameters

_containerObject with cargo <OBJECT>
_itemClassname of magazine(s) to remove STRING
_countNumber of magazine(s) to remove <NUMBER> (Default: 1)
_ammoAmmo of magazine(s) to remove (-1 for magazine(s) with any ammo) <NUMBER> (Default: -1)

Returns

true on success, false otherwise <BOOLEAN>

Examples

// Remove 1 Smokegrenade from a box
_success = [myCoolMagazineBox, "SmokeShell"] call CBA_fnc_removeMagazineCargo;

// Remove 2 Handgrenades from a box
_success = [myCoolMagazineBox, "HandGrenade_West", 2] call CBA_fnc_removeMagazineCargo;

// Remove 2 magazines which each have 5 bullets in them from a box
_success = [myCoolMagazineBox, "30Rnd_65x39_caseless_mag", 2, 5] call CBA_fnc_removeMagazineCargo;

Author

silencer.helling3r 2012-12-22, Jonpas, esteldunedain, johnb43 (from ACE)

string used by format
Close