EZL_LIFESTATE_HEALTHY = 1;
EZL_LIFESTATE_INJURED = 2;
EZL_LIFESTATE_DYING = 3;
EZL_LIFESTATE_DEAD = 4;
EZL_PLAYERINAGONY = false;
EZL_MARKERS_INFANTRY = 0;
EZL_MARKERS_VEHICLES = 1;
EZL_MARKERS_BOTH = 2;
EZL_MARKERS_GROUP = 3;
EZL_MARKERS_DISTANCE = 5250;
EZL_MARKERS_TYPE = 2;
EZL_CURRENTMARKER_DISTANCE = 5;
EZL_CURRENTMARKER_TYPE = 2;
EZL_PRIVATEVEHICLES = [];
EZL_TOTALPLAYERS = { [ES1, ES2, ES3, ES4, ES5, ES6, ES7, ES8, ES9, ES10, ES11, ES12, ES13, ES14, ES15, ES16, ES17, ES18, ES19, ES20, ES21, ES22, ES23, ES24, ES25, ES26, ES27, ES28, ES29, ES30, ES31, ES32, ES33, ES34, ES35, ES36, ES37, ES38, ES39, ES40, ES41, ES42, ES43, ES44, ES45, ES46, ES47, ES48, ES49, ES50, ES51, ES52, ES53, ES54, ES55, ES56, ES57, ES58, ES59] };
// list of players slots
EZL_CURRENTPLAYERS = [];
_a = 0;
//
// -- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// * Inmission GUI with players names and airstrike target icon
// -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//
private["_i", "_name", "_unitname", "_unit", "_lifestate", "_text", "_control", "_pos", "_veh", "_dst"];
if ( !( local player ) ) exitWith
{ };
sleep 1;
disableSerialization;
_currentCutDisplay = _this select 0;
while { ( DisplayEsp == 1 )
}
{
do
{
{
_a = 1;
{
sleep 0.0001;
{
if ( isPlayer _x && alive _x && side _x != side Player ) then
{
call compile format["ES%1 = %2", _a, _x];
_a = _a + 1;
};
}
forEach units _x;
} forEach allGroups;
if ( ( EZL_MARKERS_DISTANCE > 0 ) )
{
then
{
if ( EZL_MARKERS_DISTANCE > 0 )
{
then
{
for [{ _i = 1 }, { _i <= _a }, { _i = _i + 1 }]{ do{ _unit = [] call compile format["ES%1", _i]; _control = _currentCutDisplay displayCtrl( 1900 + _i );
_uid = getPlayerUID _unit;
_veh = vehicle _unit;
_dst = round( _veh distance( vehicle player ) );
if ( ( isPlayer _unit ) && ( _unit != player ) && !( isNull _unit ) && ( ( vehicle _unit ) != ( vehicle player ) ) && ( _dst <= EZL_MARKERS_DISTANCE ) && ( ( _unit in( units player ) ) || ( EZL_MARKERS_TYPE != EZL_MARKERS_GROUP ) ) && !( visibleMap ) && ( alive player ) )
{
then
{
_unitname = name _unit;
_pos = getPosATL _veh;
if ( _veh != _unit )
{
then
{
if ( ( ( _unit == ( effectiveCommander _veh ) ) && ( EZL_MARKERS_TYPE != EZL_MARKERS_INFANTRY ) ) || ( ( _unit in( units player ) ) && ( EZL_MARKERS_TYPE == EZL_MARKERS_GROUP ) ) )
{
then
{
_text = gettext( configFile >> "CfgVehicles" >> ( typeof _veh ) >> "displayName" );
_mask = "<t size='%4' shadow='true' align='center' color='%5'>%1</t><br/><t size='%4' shadow='true' align='center' color='%6'>[%2]</t><br/><t size='%4' shadow='true' align='center' color='%7'>%3m</t>";
_name = parseText format[_mask, "^", _unitname + " / " + _text, _dst, 0.7, "#FF0000", "#AAAAAA", "#AAAAAA"];
_pos = [_pos select 0, _pos select 1, ( _pos select 2 )];
}
}
else
{
_name = parseText "";
};
}
}
else
{
if ( ( EZL_MARKERS_TYPE != EZL_MARKERS_VEHICLES ) )
{
then
{
_lifestate = 1;
_pos = [_pos select 0, _pos select 1, ( _pos select 2 )];
_name = parseText "";
switch ( _lifestate )
{
do
{
case EZL_LIFESTATE_HEALTHY:
{
_mask = "<t size='%4' shadow='true' align='center' color='%5'>%1</t><br/><t size='%4' shadow='true' align='center' color='%6'>%2</t><br/><t size='%4' shadow='true' align='center' color='%7'>%3m</t><br/>";
_name = parseText format[_mask, "^", _unitname, _dst, 0.7, "#FF0000", "#AACCAA", "#AAAAAA"];
_pos = [_pos select 0, _pos select 1, ( _pos select 2 )];
};
case EZL_LIFESTATE_INJURED:
{
_mask = "<t size='%4' shadow='true' align='center' color='%5'>%1</t><br/><t size='%4' shadow='true' align='center' color='%6'>[%2]</t><br/><t size='%4' shadow='true' align='center' color='%7'>%3m</t>";
_name = parseText format[_mask, "[" + _unitname + "]", localize "STR_MAP_Injured", _dst, 1.0, "#AAEZLA", "#FF0000", "#AAAAFF"];
};
case EZL_LIFESTATE_DYING:
{
_mask = "<t size='%4' shadow='true' align='center' color='%5'>%1</t><br/><t size='%4' shadow='true' align='center' color='%6'>[%2]</t><br/><t size='%4' shadow='true' align='center' color='%7'>%3m</t>";
_name = parseText format[_mask, _unitname, localize "STR_MAP_Dying", _dst, 1.0, "#AAEZLA", "#FF0000", "#AAAAFF"];
};
case EZL_LIFESTATE_DEAD:
{
_mask = "<t size='%4' shadow='true' align='center' color='%5'>%1</t><br/><t size='%4' shadow='true' align='center' color='%6'>[%2]</t><br/><t size='%4' shadow='true' align='center' color='%7'>%3m</t>";
_name = parseText format[_mask, _unitname, localize "STR_MAP_Dead", _dst, 1.0, "#AAEZLA", "#FF0000", "#AAAAFF"];
};
} ;
}
}
}
else
{
_name = parseText "";
};
};
_pos = worldToScreen _pos;
if ( ( count _pos ) != 0 )
{
then
{
ctrlShow[_control, true];
_control ctrlSetStructuredText _name;
_control ctrlSetPosition[( _pos select 0 ) - 0.125, _pos select 1];
_control ctrlCommit 0;
waitUntil
{
ctrlCommitted _control
};
}
}
else
{
ctrlShow[_control, false];
_control ctrlSetStructuredText parseText "";
_control ctrlCommit 0;
waitUntil
{
ctrlCommitted _control
};
};
}
}
else
{
ctrlShow[_control, false];
_control ctrlSetStructuredText parseText "";
_control ctrlCommit 0;
waitUntil
{
ctrlCommitted _control
};
};
} ;
}
}
};
if ( ( ( currentWeapon player ) == "LaserDesignator" ) || ( ( ( typeOf( vehicle player ) ) in EZL_ASSAULTAIR ) && ( ( player == driver( vehicle player ) ) || ( player == gunner( vehicle player ) ) ) ) )
{
then
{
if ( count EZL_DESIGNATION_TARGET > 0 )
{
then
{
_dst = round( ( vehicle player ) distance EZL_DESIGNATION_TARGET );
_text = round( 90 + EZL_DESIGNATION_TIME - time );
_mask = "<t size='%4' shadow='true' align='center' color='%5'>%1</t><br/><t size='%4' shadow='true' align='center' color='%6'>%2sec</t><br/><t size='%4' shadow='true' align='center' color='%7'>%3m</t><br/><t><img image='gui\selector_selectedmission_ca.paa' align='center' color='%5' size='3.0'></t>";
_name = parseText format[_mask, localize "STR_MAP_AirStrike", _text, _dst, 1.0, "#FF0000", "#FFFFFF", "#AAAAFF"];
_pos = worldToScreen EZL_DESIGNATION_TARGET;
if ( count _pos > 0 )
{
then
{
_control = _currentCutDisplay displayCtrl( 1991 );
ctrlShow[_control, true];
_control ctrlSetPosition[( _pos select 0 ) - 0.125, ( _pos select 1 ) - 0.125];
_control ctrlSetStructuredText _name;
_control ctrlCommit 0;
waitUntil
{
ctrlCommitted _control
};
}
};
if ( _text <= 0 ) then
{
EZL_DESIGNATION_TARGET = [];
};
}
}
else
{
_control = _currentCutDisplay displayCtrl( 1991 );
ctrlShow[_control, false];
_control ctrlSetStructuredText parseText "";
_control ctrlCommit 0;
waitUntil
{
ctrlCommitted _control
};
};
}
}
else
{
_control = _currentCutDisplay displayCtrl( 1991 );
ctrlShow[_control, false];
_control ctrlSetStructuredText parseText "";
_control ctrlCommit 0;
waitUntil
{
ctrlCommitted _control
};
};
}
}
else
{ };
{
for [{ _i = 1 }, { _i <= 20 }, { _i = _i + 1 }]{ do{ _control = _currentCutDisplay displayCtrl( 1900 + _i );
ctrlShow[_control, false];
_control ctrlSetStructuredText parseText "";
_control ctrlCommit 0;
waitUntil
{
ctrlCommitted _control
};
} ;
}
sleep 1.01;
};
}
foreach allunits;
} ;
}
seeing as i dont use this anymore and people have asked how it was done i will release this here
it must not be posted anywhere else in its modified condiction and i do not claim i made this but it is heavely modified by me to work independently of the origional mission
all credits to the guy who made it im not sure of his name but all credits go to him and a little to me for getting it unhooked from the mission it was originally intended to be used on.
note to set up you will have to create the dialog's simpleneough create 1900 to 1999 in a loop. then create them with cutrsc
eg.
class display_esp
{
dialogdefines
} etc
then call the init and it will run as long as the variable is set to above 0.
good luck and happy shooting through trees