ACE3/addons/common/functions/fnc_hasItem.sqf
johnb432 dae2c5b465
Common - Clean up ace_common_fnc_hasItem & ace_common_fnc_hasMagazine functions (#10108)
* Clean up hasItem & hasMagazine functions

* Replace EFUNC

* Update fnc_hasItem.sqf
2024-07-03 08:39:04 -07:00

22 lines
449 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: Glowbal
* Check if given unit has an item of given classname. Note: Case sensitive.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Item classname <STRING>
*
* Return Value:
* Unit has item <BOOL>
*
* Example:
* [player, "ACE_Banana"] call ace_common_fnc_hasItem
*
* Public: Yes
*/
params [["_unit", objNull, [objNull]], ["_item", "", [""]]];
_item in (_unit call FUNC(uniqueItems)) // return