mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
21 lines
511 B
Plaintext
21 lines
511 B
Plaintext
/**
|
|
* fn_hasMagazine.sqf
|
|
* @Descr: Check if given unit has a magazine of given classname
|
|
* @Author: Glowbal
|
|
*
|
|
* @Arguments: [unit OBJECT, magazine STRING]
|
|
* @Return: BOOL True if unith as given magazine
|
|
* @PublicAPI: true
|
|
*/
|
|
|
|
private ["_unit","_magazine","_return"];
|
|
_unit = _this select 0;
|
|
_magazine = _this select 1;
|
|
|
|
if (_magazine != "") then {
|
|
_return = (_magazine in magazines _unit);
|
|
} else {
|
|
_return = false;
|
|
};
|
|
//[format["fnc_hasMagazine: %1 | %2",_this,_return]] call cse_fnc_debug;
|
|
_return |