ACE3/addons/explosives/functions/fnc_hasExplosives.sqf
Dedmen Miller 81e02a7336 Refactor private ARRAY to private keyword (#5598)
* Everything

* Fixed missing ;

* Fix missing ; and double private

* Fixed cannot isNull on number

* Turn _temparture back to isNil

* Fix error from merge
2017-10-10 09:39:59 -05:00

30 lines
577 B
Plaintext

/*
* Author: Garth 'L-H' de Wet
* Whether the passed unit has any explosives on them.
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* The unit has explosives <BOOL>
*
* Example:
* hasExplosives = [player] call ACE_Explosives_fnc_hasExplosives;
*
* Public: Yes
*/
#include "script_component.hpp"
params ["_unit"];
TRACE_1("params",_unit);
private _result = false;
private _magazines = magazines _unit;
{
if (getNumber (ConfigFile >> "CfgMagazines" >> _x >> QGVAR(Placeable)) == 1) exitWith {
_result = true;
};
} count _magazines;
_result