ACE3/addons/switchunits/functions/fnc_startSwitchUnits.sqf
Dedmen Miller 0633b807fa Some Refactoring (#6607)
* SwitchUnits

* tacticalLadder

* vehiclelock

* vector

* Typo, thanks circleCI

* Fix stuff

* Fix animate loop
2018-10-09 20:21:46 -05:00

32 lines
715 B
Plaintext

#include "script_component.hpp"
/*
* Author: bux578
* Starts the SwitchUnits functionality
*
* Arguments:
* 0: player <OBJECT>
*
* Return Value:
* None
*
* Example:
* [_player] call ace_switchunits_fnc_startSwitchUnits
*
* Public: No
*/
params ["_player"];
if (GVAR(EnableSwitchUnits)) then {
private _sides = [];
if (GVAR(SwitchToWest)) then {_sides pushBack west;};
if (GVAR(SwitchToEast)) then {_sides pushBack east;};
if (GVAR(SwitchToIndependent)) then {_sides pushBack independent;};
if (GVAR(SwitchToCivilian)) then {_sides pushBack civilian;};
if (_player getVariable ["ACE_CanSwitchUnits", false]) then {
[_player, _sides] call FUNC(initPlayer);
};
};