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

26 lines
449 B
Plaintext

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