mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
29 lines
510 B
Plaintext
29 lines
510 B
Plaintext
/**
|
|
* fn_getNumberMagazinesIn.sqf
|
|
* @Descr:
|
|
* @Author: Glowbal
|
|
*
|
|
* @Arguments: []
|
|
* @Return:
|
|
* @PublicAPI: true
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
PARAMS_2(_unit,_magazine);
|
|
|
|
private ["_return"];
|
|
|
|
_return = 0;
|
|
if (_unit isKindOf "CAManBase") then {
|
|
_return = {_x == _magazine} count magazines _unit;
|
|
} else {
|
|
{
|
|
_return = _return + {_x == _magazine} count magazines _x;
|
|
} forEach (crew _unit);
|
|
|
|
_return = _return + ({_x == _magazine} count getMagazineCargo _unit);
|
|
};
|
|
|
|
_return
|