ACE3/addons/explosives/functions/fnc_getSpeedDialExplosive.sqf
Dedmen Miller 81e02a7336 Refactor private ARRAY to private keyword (#5598)
* Everything

* Fixed missing ;

* Fix missing ; and double private

* Fixed cannot isNull on number

* Turn _temparture back to isNil

* Fix error from merge
2017-10-10 09:39:59 -05:00

31 lines
570 B
Plaintext

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