Code:
espIndex = _this select 1;
setGroupIconsVisible [false,true];
while {(vars select espIndex) == "1"} do
{
_i = 0;
_j = count allUnits;
for "_i" from 0 to _j do
{
_unit = allUnits select _i;
if (alive _unit && player != _unit) then
{
_group = group _unit;
_group addGroupIcon ["b_inf", [0,0]];
_group setGroupIconParams [[1,1,1,1],format ["%1 - %2m", name _unit, ceil (_unit distance player)],0.8,true];
};
};
sleep 1;
_i = 0;
_j = count allUnits;
for "_i" from 0 to _j do
{
_unit = allUnits select _i;
_group = group _unit;
clearGroupIcons _group;
};
};
this is current code. i love how meters from players shows up. but i wish vehicles showed up on map too. anyone able to help?