ACE3/addons/common/functions/fnc_hasItem.sqf

22 lines
449 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 an item 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: Item classname <STRING>
2015-09-19 20:27:23 +00:00
*
* Return Value:
* Unit has item <BOOL>
2015-09-19 20:27:23 +00:00
*
* Example:
* [player, "ACE_Banana"] call ace_common_fnc_hasItem
*
* Public: Yes
2015-01-16 23:21:47 +00:00
*/
2015-09-19 20:27:23 +00:00
params [["_unit", objNull, [objNull]], ["_item", "", [""]]];
2015-01-16 23:21:47 +00:00
_item in (_unit call FUNC(uniqueItems)) // return