mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
parent
58b557bd99
commit
e14d49393a
@ -3,3 +3,10 @@ class Extended_PreInit_EventHandlers {
|
||||
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
|
||||
};
|
||||
};
|
||||
/*
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
clientInit = QUOTE( call COMPILE_FILE(XEH_clientInit) );
|
||||
};
|
||||
};
|
||||
*/
|
||||
|
43
addons/switchunits/XEH_clientInit.sqf
Normal file
43
addons/switchunits/XEH_clientInit.sqf
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Author: bux578
|
||||
* Initializes the SwitchUnits pbo.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
/*
|
||||
|
||||
DFUNC(pfhClientInit) = {
|
||||
|
||||
if (GVAR(EnableSwitchUnits)) exitWith {
|
||||
|
||||
private ["_sides"];
|
||||
_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);
|
||||
};
|
||||
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
};
|
||||
|
||||
[FUNC(pfhClientInit), 0.5, []] call cba_fnc_addPerFrameHandler;
|
||||
|
||||
*/
|
Loading…
Reference in New Issue
Block a user