ACE3/addons/switchunits/XEH_postInit.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

38 lines
787 B
Plaintext

/*
* Author: bux578
* Initializes the SwitchUnits pbo.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* None
*
* Public: No
*/
#include "script_component.hpp"
if (missionNamespace getVariable [QGVAR(EnableSwitchUnits), false]) then {
[player] call FUNC(startSwitchUnits);
} else {
["ace_settingChanged", {
params ["_name", "_value"];
if ((_name == QGVAR(EnableSwitchUnits)) && {_value}) then {
[player] call FUNC(startSwitchUnits);
};
}] call CBA_fnc_addEventHandler;
};
if (isServer) then {
[QGVAR(switchLocality), {
params ["_unit", "_player"];
_unit setVariable [QGVAR(OriginalOwner), owner _unit, true];
_unit setOwner (owner _player);
}] call CBA_fnc_addEventHandler;
};