ACE3/addons/explosives/functions/fnc_getSpeedDialExplosive.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

31 lines
573 B
Plaintext

#include "..\script_component.hpp"
/*
* 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
*/
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