36 lines
775 B
Plaintext
36 lines
775 B
Plaintext
/*
|
|
Author: Djeeberjr
|
|
|
|
Description:
|
|
Init a zeus player.
|
|
|
|
Parameter(s):
|
|
0: OBJECT - zeus unit
|
|
*/
|
|
params ["_unit"];
|
|
|
|
//Command can only be executed on the server.
|
|
if(!isServer)exitWith{};
|
|
|
|
//Check if unit is alredy a curator
|
|
if(_unit call BIS_fnc_isCurator)exitWith{};
|
|
|
|
//Create Zeus module if not created yet.
|
|
if(isNil "DLib_zeusModule")then{
|
|
_sideLogic = createCenter sidelogic;
|
|
_group_logic = createGroup _sideLogic;
|
|
DLib_zeusModule = _group_logic createUnit ["ModuleCurator_F", [0,0,0], [],0, "NONE"];
|
|
DLib_zeusModule addCuratorEditableObjects [allUnits,true];
|
|
publicVariable "DLib_zeusModule";
|
|
};
|
|
|
|
_unit assignCurator DLib_zeusModule;
|
|
|
|
//Add vision modes
|
|
[_unit,[-1,-2,0,1,2,3,4,5,6,7]] call BIS_fnc_setCuratorVisionModes;
|
|
|
|
//godmode
|
|
_unit allowDamage false;
|
|
|
|
|