2015-02-04 00:16:47 +00:00
|
|
|
/*
|
|
|
|
* Author: Garth 'L-H' de Wet
|
2015-02-19 13:59:14 +00:00
|
|
|
* Gets the explosive from the speed dial entry.
|
2015-02-04 00:16:47 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2015-02-19 13:59:14 +00:00
|
|
|
* 0: Speed dial entry <STRING>
|
2015-02-04 00:16:47 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Associated explosive (or ObjNull) <OBJECT>
|
|
|
|
*
|
|
|
|
* Example:
|
2015-02-19 13:59:14 +00:00
|
|
|
* ["2113"] call ace_explosives_fnc_getSpeedDialExplosive;
|
2015-02-04 00:16:47 +00:00
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
2015-02-19 13:59:14 +00:00
|
|
|
EXPLODE_1_PVT(_this,_code);
|
2015-02-04 00:16:47 +00:00
|
|
|
private ["_explosive"];
|
2015-02-19 13:59:14 +00:00
|
|
|
if (isNil QGVAR(CellphoneIEDs)) exitWith {[]};
|
|
|
|
_explosive = [];
|
2015-02-04 00:16:47 +00:00
|
|
|
{
|
2015-04-06 20:20:11 +00:00
|
|
|
if ((_x select 1) == _code) exitWith {
|
|
|
|
_explosive = _x;
|
|
|
|
};
|
|
|
|
false
|
2015-02-04 00:16:47 +00:00
|
|
|
} count GVAR(CellphoneIEDs);
|
|
|
|
_explosive
|