ACE3/addons/common/functions/fnc_hasMagazine.sqf

22 lines
491 B
Plaintext
Raw Normal View History

#include "..\script_component.hpp"
2015-09-19 20:27:23 +00:00
/*
* Author: Glowbal
* Check if given unit has a magazine of given classname. Note: Case sensitive.
2015-01-16 23:21:47 +00:00
*
2015-09-19 20:27:23 +00:00
* Arguments:
* 0: Unit <OBJECT>
* 1: Magazine classname <STRING>
2015-09-19 20:27:23 +00:00
*
* Return Value:
* Unit has magazine <BOOL>
2015-09-19 20:27:23 +00:00
*
* Example:
* [player, "30Rnd_65x39_caseless_mag"] call ace_common_fnc_hasMagazine
*
2015-09-19 20:27:23 +00:00
* Public: yes
2015-01-16 23:21:47 +00:00
*/
params [["_unit", objNull, [objNull]], ["_magazine", "", [""]]];
2015-05-14 18:06:06 +00:00
_magazine in ([_unit, 2] call FUNC(uniqueItems)) // return