mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
32 lines
597 B
Plaintext
32 lines
597 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", "_magazines"];
|
|
|
|
_result = false;
|
|
_magazines = magazines _unit;
|
|
{
|
|
if (getNumber (ConfigFile >> "CfgMagazines" >> _x >> QGVAR(Placeable)) == 1) exitWith {
|
|
_result = true;
|
|
};
|
|
} count _magazines;
|
|
|
|
_result
|