mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
0633b807fa
* SwitchUnits * tacticalLadder * vehiclelock * vector * Typo, thanks circleCI * Fix stuff * Fix animate loop
32 lines
715 B
Plaintext
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);
|
|
};
|
|
};
|