Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- oiuyabwd = [];
- heijticjeh = [];
- if (isnil "oiahbwd0oawd") then {
- oiahbwd0oawd = 0;
- };
- if (oiahbwd0oawd == 0) then {
- oiahbwd0oawd = 1;
- hint "Players locations on the Map have been added.";
- } else {
- oiahbwd0oawd = 0;
- hint "Players locations on the Map have been removed.";
- };
- while {
- oiahbwd0oawd == 1
- }
- do {
- {
- if ((vehicle _x isKindOf "LandVehicle") || (vehicle _x isKindOf "Air") || (vehicle _x isKindOf "Ship")) then {
- if (count(crew vehicle _x) > 0) then {
- {
- if (!(_x in oiuyabwd) and(alive _x) and(getPlayerUID _x != "")) then {
- private["_pos", "_l44", "_l45"];
- _l45 = vehicle _x;
- _pos = visiblePosition _x;
- _l44 = createMarkerLocal[format["CRW%1%2", _pos select 0, _pos select 1], [(_pos select 0) + 20, _pos select 1, 0]];
- _l8 = (gettext(configFile >> 'CfgVehicles' >> (typeof vehicle _x) >> 'displayName'));
- _l44 setMarkerTextLocal format['%1---%2---%3m', name _x, _l8, round(_x distance player)];
- _l44 setMarkerTypeLocal "mil_dot";
- if ((side _x == side player) and(side _x != resistance)) then {
- _l44 setMarkerColorLocal "ColorBlue";
- } else {
- _l44 setMarkerColorLocal "ColorRed";
- };
- _l44 setMarkerSizeLocal[1, 1];
- oiuyabwd set[count oiuyabwd, _x];
- [_x, _l44, _l45] spawn {
- private["_l46", "_l47", "_l48"];
- _l46 = _this select 0;
- _l47 = _this select 1;
- while {
- (oiahbwd0oawd == 1) and(alive _l46) and(vehicle _l46 != _l46) and(getPlayerUID _l46 != "")
- }
- do {
- _l48 = ((crew vehicle _l46) find _l46);
- _l47 setMarkerPosLocal([(visiblePosition _l46 select 0) + 20, (visiblePosition _l46 select 1) - (25 + _l48 * 20), 0]);
- sleep 0.01;
- };
- deleteMarkerLocal _l47;
- if (_l46 in oiuyabwd) then {
- oiuyabwd set[(oiuyabwd find _l46), -1];
- oiuyabwd = oiuyabwd - [-1];
- };
- true;
- };
- };
- }
- forEach crew vehicle _x;
- };
- } else {
- if (!(_x in heijticjeh) and(vehicle _x == _x) and(getPlayerUID _x != "")) then {
- private["_pos", "_l44"];
- _pos = visiblePosition _x;
- _l44 = createMarkerLocal[format["PLR%1%2", _pos select 0, _pos select 1], [(_pos select 0) + 20, _pos select 1, 0]];
- _l44 setMarkerTypeLocal "mil_dot";
- _l44 setMarkerSizeLocal[1, 1];
- if ((side _x == side player) and(side _x != resistance)) then {
- _l44 setMarkerColorLocal "ColorRed";
- } else {
- _l44 setMarkerColorLocal "ColorRedAlpha";
- };
- _l44 setMarkerTextLocal format["%1---%2", name _x, round(_x distance player)];
- if (_x == player) then {
- _l44 setMarkerColorLocal "ColorGreen";
- };
- heijticjeh set[count heijticjeh, _x];
- [_x, _l44] spawn {
- private["_l46", "_l47"];
- _l46 = _this select 0;
- _l47 = _this select 1;
- while {
- (oiahbwd0oawd == 1) and(alive _l46) and(vehicle _l46 == _l46) and(getPlayerUID _l46 != "")
- }
- do {
- _l47 setMarkerPosLocal([visiblePosition _l46 select 0, visiblePosition _l46 select 1, 0]);
- sleep 0.01;
- };
- deleteMarkerLocal _l47;
- if (_l46 in heijticjeh) then {
- heijticjeh set[(heijticjeh find _l46), -1];
- heijticjeh = heijticjeh - [-1];
- };
- true;
- };
- };
- };
- }
- forEach playableUnits;
- sleep 0.3;
- }; {
- _l44 = str _x;
- deleteMarkerLocal _l44;
- }
- forEach playableUnits;
- if (isnil "piajbwdawd" ) then {piajbwdawd=0};
- if (piajbwdawd==0) then
- {
- hint "Adding Vehicle Markers";
- piajbwdawd=1;
- VL = vehicles;
- j = count VL;
- i = 0;
- boiawd = true;
- while {boiawd} do
- {
- VL = vehicles;
- j = count VL;
- i = 0;
- for "i" from 0 to j do
- {
- veh = VL select i;
- deleteMarkerLocal ("VM"+ (str i));
- mk2 = "VM" + (str i);
- mk2 = createMarkerLocal [mk2,getPos veh];
- mk2 setMarkerTypeLocal "waypoint";
- mk2 setMarkerPosLocal (getPos veh);
- mk2 setMarkerColorLocal("ColorGreen");
- mk2 setMarkerTextLocal format ["%1",typeOf veh];
- };
- sleep 0.5;
- };
- }
- else
- {
- hint "VM Stopping";
- i = 0;
- boiawd = false;
- piajbwdawd=0;
- for "i" from 0 to j do
- {
- veh = VL select i;
- deleteMarkerLocal ("VM"+ (str i));
- };
- };
- hint "Vehicle and Player markers added.";
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement