2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-01-12 09:48:26 +00:00
|
|
|
Name: ACE_Explosives_fnc_hasExplosives
|
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Author: Garth de Wet (LH)
|
2015-01-12 09:48:26 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Description:
|
|
|
|
Whether the passed unit has any explosives on them.
|
2015-01-12 09:48:26 +00:00
|
|
|
|
|
|
|
Parameters:
|
2015-01-11 16:42:31 +00:00
|
|
|
0: OBJECT - unit
|
2015-01-12 09:48:26 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Returns:
|
|
|
|
BOOLEAN - True if the unit has explosives.
|
2015-01-12 09:48:26 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
Example:
|
2015-01-12 09:48:26 +00:00
|
|
|
_hasExplosives = [player] call ACE_Explosives_fnc_hasExplosives;
|
2015-01-11 16:42:31 +00:00
|
|
|
*/
|
2015-01-13 21:21:31 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
private ["_unit", "_result", "_magazines"];
|
|
|
|
_result = false;
|
|
|
|
_unit = _this select 0;
|
|
|
|
_magazines = magazines _unit;
|
|
|
|
{
|
2015-01-12 09:48:26 +00:00
|
|
|
if (getNumber (ConfigFile >> "CfgMagazines" >> _x >> "ACE_Placeable") == 1) exitWith {
|
2015-01-11 16:42:31 +00:00
|
|
|
_result = true;
|
|
|
|
};
|
|
|
|
} count _magazines;
|
|
|
|
|
|
|
|
_result
|