/* * Author: Garth 'L-H' de Wet * Gets the explosive object or objNull from the speed dial entry. * * Arguments: * 0: Unit * 1: Speed dial entry * * Return Value: * Associated explosive (or ObjNull) * * Example: * [ace_player, "2113"] call ace_explosives_fnc_getSpeedDialExplosive; * * Public: Yes */ #include "script_component.hpp" EXPLODE_2_PVT(_this,_unit,_code); private ["_explosive"]; if (isNil QGVAR(CellphoneIEDs)) exitWith {objNull}; _explosive = objNull; { if ((_x select 1) == _code) exitWith { _explosive = _x select 0; }; false } count GVAR(CellphoneIEDs); _explosive