ACE3/addons/common/functions/fnc_hasMagazine.sqf
2015-05-14 20:06:06 +02:00

22 lines
433 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
*/
#include "script_component.hpp"
private ["_return"];
PARAMS_2(_unit,_magazine);
if (_magazine != "") then {
_return = (_magazine in magazines _unit);
} else {
_return = false;
};
_return