{"name":"BIS_fnc_hasItem","operator":null,"title":"BIS fnc hasItem","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_hasItem","revid":328409,"updated":"2022-07-13T16:00:50Z","groups":["Inventory"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.94"}],"since":{"game":"arma3","name":"Arma 3","version":"1.94"},"arma3_since":"1.94","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Returns true if object contains given item in inventory / cargo storage.\n\n> [!IMPORTANT]\n> This function performs a deep search of inventory / cargo storage, thus is not suitable for per-frame execution.","syntaxes":[{"syntax":"[object, item, searchCrew] call BIS_fnc_hasItem","since":null,"effect":null,"exec":null,"params":[{"name":"object","type":"Object or Group","optional":false,"default":null,"description":"unit, vehicle, container or group of units (since v1.95)","types":["Object","Group"],"since":null,"text":"object: Object or Group - unit, vehicle, container or group of units (since v1.95)"},{"name":"item","type":"String","optional":false,"default":null,"description":"item to find","types":["String"],"since":null,"text":"item: String - item to find"},{"name":"searchCrew","type":"Boolean","optional":true,"default":"false","description":"true to search vehicle crew as well if object is a vehicle","types":["Boolean"],"since":null,"text":"searchCrew: Boolean - (Optional, default false) true to search vehicle crew as well if object is a vehicle"}],"returns":{"type":"Boolean","types":["Boolean"],"description":"true if has item","text":"Boolean - true if has item"}}],"examples":[{"text":"```sqf\n[player, \"ItemMap\"] call BIS_fnc_hasItem;\n```","code":["[player, \"ItemMap\"] call BIS_fnc_hasItem;"]},{"text":"```sqf\n[tank, \"FirstAidKit\", true] call BIS_fnc_hasItem;\n```","code":["[tank, \"FirstAidKit\", true] call BIS_fnc_hasItem;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":[],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Inventory","Functions","Introduced with Arma 3 version 1.94"],"docblock":null,"filled_from_docblock":[]}