ACE3/addons/bft/functions/fnc_setDeviceKeys.sqf
2016-09-03 09:35:37 +02:00

27 lines
484 B
Plaintext

/*
* Author: Glowbal
*
*
* Arguments:
* 0: device ID <STRING>
* 1: keys <ARRAY>
*
* Return Value:
* None
*
* Public: No
*/
#include "script_component.hpp"
params ["_deviceID", "_keys"];
private ["_data"];
_data = [_deviceID] call FUNC(getDeviceData);
if (count _data < 2) exitwith {};
if (count (_data select 1) < 2) exitwith {};
if (_keys isEqualTo (_data select 1) select 1) exitwith {};
["bft_updateDeviceKeys", [_deviceID, _keys]] call EFUNC(common,globalEvent);