Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- (findDisplay 12 displayCtrl 51) ctrlRemoveEventHandler ["Draw",TeamMapEvent];
- } remoteExec ["bis_fnc_call", 0];
- {} remoteExec ["BIS_fnc_call",0,"TeamMapUI"];
- {
- [] spawn
- {
- waitUntil {sleep 0.1; getClientState == "BRIEFING READ"};
- disableMapIndicators [true,false,false,false];
- maxDistanceFlagMarker3D = 1500;
- transitionDistanceFlagMarker3D = 500;
- maxDistanceUnitMarker3D = 150;
- maxDistanceUnitMarkerText3D = 10;
- maxCursorRangeUnitMarker = 0.02;
- minMapZoomUnitMarker = 0.0045;
- TeamMapEvent = (findDisplay 12 displayCtrl 51) ctrlAddEventHandler ["Draw",
- {
- _vehicleList = [];
- {
- if((side group _x) isEqualTo (side group player)) then
- {
- _pos = _x modelToWorldVisual [0,0,0];
- _unit = driver vehicle _x;
- _dir = getDir _x;
- _text = (name _x);
- _distance = player distance _x;
- _alpha = 1;
- _color = switch (side group _x) do
- {
- case west: {[0.10,0.45,1,_alpha]};
- case east: {[0.8,0.05,0,_alpha]};
- case independent: {[0.5,1,0.5,_alpha]};
- default {[1,1,1,_alpha]};
- };
- if((group player) isEqualTo (group _unit)) then
- {
- _color = [1,0.855,0.28,_alpha];
- };
- _pos2D = (_this select 0) ctrlMapWorldToScreen _pos;
- _posCursor2D = getMousePosition;
- _dist = _pos2D distance2D _posCursor2D;
- _scale = ctrlMapScale (_this select 0);
- if (vehicle _x == _x) then
- {
- if((_scale > minMapZoomUnitMarker) && (_dist > maxCursorRangeUnitMarker)) then {_text = "";};
- _this select 0 drawIcon
- [
- "\A3\ui_f\data\Map\VehicleIcons\iconManVirtual_ca.paa",
- _color,
- _pos,
- 20,
- 20,
- _dir,
- _text,
- 2,
- 0.05,
- "RobotoCondensedBold",
- "left"
- ];
- _this select 0 drawIcon
- [
- "\A3\ui_f\data\Map\VehicleIcons\iconManVirtual_ca.paa",
- _color,
- _pos,
- 20,
- 20,
- _dir,
- _text,
- 1,
- 0.05,
- "RobotoCondensedBold",
- "left"
- ];
- }
- else
- {
- if !((vehicle _x) in _vehicleList) then
- {
- _vehicleList pushback vehicle _x;
- _dir = getDir vehicle _x;
- _className = (typeOf vehicle _x);
- _file = getText (configfile >> "CfgVehicles" >> _className >> "icon");
- _driver = driver vehicle _x;
- _vehName = getText (configfile >> "CfgVehicles" >> _className >> "displayName");
- _text = _vehName;
- _text2 = "";
- _count = count crew vehicle _x;
- if(_count > 1) then
- {
- _text2 = ((name _driver) + " + " + (str (_count-1)) + " more");
- }
- else
- {
- _text2 = (name _driver);
- };
- if((_scale > minMapZoomUnitMarker) && (_dist > maxCursorRangeUnitMarker)) then {_text = ""; _text2 = "";};
- _this select 0 drawIcon
- [
- _file,
- _color,
- _pos,
- 20,
- 20,
- _dir,
- _text,
- 2,
- 0.05,
- "RobotoCondensedBold",
- "left"
- ];
- _this select 0 drawIcon
- [
- _file,
- _color,
- _pos,
- 20,
- 20,
- _dir,
- _text2,
- 2,
- 0.05,
- "RobotoCondensedBold",
- "right"
- ];
- _this select 0 drawIcon
- [
- _file,
- _color,
- _pos,
- 20,
- 20,
- _dir,
- _text,
- 1,
- 0.05,
- "RobotoCondensedBold",
- "left"
- ];
- };
- };
- if(_x == player) then
- {
- _color set[3,0.5];
- _this select 0 drawIcon
- [
- "\a3\ui_f\data\Map\groupIcons\selector_selected_ca.paa",
- _color,
- _pos,
- 30,
- 30,
- _dir,
- "",
- 0,
- 0.05,
- "RobotoCondensedBold",
- "left"
- ];
- };
- };
- } foreach allPlayers;
- }];
- };
- } remoteExec ["BIS_fnc_call",0,"TeamMapUI"];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement