-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathInitServer.sqf
More file actions
61 lines (54 loc) · 2.02 KB
/
InitServer.sqf
File metadata and controls
61 lines (54 loc) · 2.02 KB
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
59
60
61
["Initialize"] call BIS_fnc_dynamicGroups;
private _objectiveMarkers = allMapMarkers select { ["sector_", _x] call BIS_fnc_inString };
private _objectiveMarkersHandle = [_objectiveMarkers] spawn {
params [
["_markers", [], [[""]]]
];
while {true} do {
{
private _marker = _x;
private _pos = getMarkerPos _marker;
private _east = [];
private _west = [];
{
if (side _x == west) then {
_west pushBack _x;
};
if (side _x == east) then {
_east pushBack _x;
};
} forEach (allUnits select { _x distance2d _pos <= 200 });
private _countWest = count _west;
private _countEast = count _east;
if (_countWest > 0 && {_countEast == 0}) then {
/*private _newMarker = _marker + "_nato";
if (isNil getMarkerType _newMarker) then {
createMarker [_newMarker, _pos];
};*/
if (markerShape _marker != "ICON") then {
_marker setMarkerShape "ICON";
};
if (markerType _marker != "flag_NATO") then {
_marker setMarkerType "flag_NATO";
};
};
if (_countEast > 0 && {_countWest == 0}) then {
if (markerShape _marker != "ICON") then {
_marker setMarkerShape "ICON";
};
if (markerType _marker != "flag_CSAT") then {
_marker setMarkerType "flag_CSAT";
};
};
if (_countWest > 0 && _countEast > 0) then {
if (markerShape _marker != "ICON") then {
_marker setMarkerShape "ICON";
};
if (markerType _marker != "EMPTY") then {
_marker setMarkerType "Empty";
};
};
} forEach _markers;
sleep 5;
};
};