BASE fnc setMagCargo

From Desolation REDUX Wiki
Jump to navigation Jump to search

Description[edit]

Sets the containers magazine cargo.

Syntax[edit]

Syntax

[container,magazines,removeOldMags] call BASE_fnc_setMagCargo

Parameters

container: Object - Container to set the cargo of.
magazines: Array - magazine informations.
removeOldMags (Optional): Boolean - By default this is False.

Return Value

True - Returns true after code is executed.

Examples[edit]

Example 1:

_magazines = [uniformContainer player] call BASE_fnc_getMagCargo;
[(vestContainer player),_cargo] call BASE_fnc_setMagCargo;

Example 2:

_magazines = [crate1] call BASE_fnc_getMagCargo;
[crate2,_magazines] call BASE_fnc_setMagCargo;

Example 3:

_magazines = [crate1] call BASE_fnc_getMagCargo;
[crate2,_magazines,true] call BASE_fnc_setMagCargo;

Additional Information[edit]

Execution: Call

See Also: APMS Specific Functions

Notes[edit]