-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinitServer.sqf
58 lines (46 loc) · 1.24 KB
/
initServer.sqf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
call compile preProcessFileLineNumbers "initVariables.sqf";
objectivesFinished = 0;
extractionAvailable = false;
extractionFinished = false;
currentObjectives = [ ];
opforGuids = [ ];
availableUavs = 0;
publicVariable "objectivesFinished";
publicVariable "extractionAvailable";
publicVariable "extractionFinished";
publicVariable "currentObjectives";
publicVariable "availableUavs";
enableEngineArtillery false;
[availableObjectives] call compile preProcessFileLineNumbers "selectObjectives.sqf";
addMissionEventHandler ["HandleDisconnect", {
private ["_unit"];
_unit = _this select 0;
private ["_guid"];
_guid = getPlayerUID _x;
if(side _unit == east && (_guid in opforGuids)) then
{
_unit setDamage 1;
[[_unit], "Mh_fnc_resolveHuntedCorpse", true, true] call Bis_fnc_MP;
true;
}
else
{
false;
};
}];
private ["_resolveGuids"];
_resolveGuids = {
{
private ["_guid"];
_guid = getPlayerUID _x;
if(!(_guid in opforGuids)) then
{
opforGuids pushBack (getPlayerUID _x);
};
} forEach ([east] call Mh_fnc_getSideUnits);
};
call _resolveGuids;
sleep 1;
call _resolveGuids;
execVM "tracker.sqf";
execVM "checkEndConditions.sqf";