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
|
|
|
{
|
|
|
|
if ((_x select 1) == _code) exitWith {
|
2015-02-19 10:39:13 +00:00
|
|
|
_explosive = _x;
|
2015-02-04 00:16:47 +00:00
|
|
|
};
|
|
|
|
false
|
|
|
|
} count GVAR(CellphoneIEDs);
|
|
|
|
_explosive
|