onEachFrame
{
if !(visibleMap) then
{
_name=parseText "";
_pveh=vehicle player;
_pgroup = group player;
_trouble=0;
for "_i" from 1 to FFA_COUNTPLAYERS do
{
if !(isnil {[] call compile format ["ES%1",_i]}) then
{
_x=[] call compile format ["ES%1",_i];
if ((alive _x) && {_x!=player}) then
{
_ctrlq = ((uiNamespace getVariable 'HDPU') displayCtrl (500 + _i));
_veh=vehicle _x;
_pos=visiblePosition _veh;
_scrpos=worldToScreen _pos;
if ((count _scrpos)!=0) then
{
_t = [] call compile format ["time%1",_i]; //
_currenttime=diag_tickTime; //
call
{
if !((lineIntersects [eyePos player,eyePos _veh,_veh,_pveh])||(terrainIntersectASL [eyePos player,eyePos _veh])) exitwith //
{
_t=[] call compile format ["time%1 = %2;time%1",_i,_currenttime + 2]; //
if (_veh!=_pveh) then
{
_dst=round (_veh distance _pveh);
_xname = name _veh;
_xgroup=group _x;
call
{
if (_veh!=_x && {_x==(effectiveCommander _veh)} && {_dst<=600}) exitwith
{
_fsize1=0.8-(_dst*0.001);
_fsize=(round(_fsize1*10))/10;
_text = gettext(configFile >> "CfgVehicles" >> (typeof _veh) >> "displayName");
_mask="<t size='%3' shadow='true' align='center' color='%4'>%1</t><br/><t size='%3' shadow='true' align='center' color='%5'>[%2]</t>";
if (_xgroup==_pgroup) then
{
_name=parseText format[_mask,_xname,_text,_fsize,"#00FF00","#FFFFFF"]; //осн цвет
} else {
_name=parseText format[_mask,_xname,_text,_fsize,"#00BFFF","#FFFFFF"];
};
_pos=[_pos select 0,_pos select 1,(_pos select 2)+3.5];
};
if (_veh!=_x && {_x==(effectiveCommander _veh)} && {_dst>600}) exitwith
{
if (_xgroup==_pgroup) then
{
_name=parseText "<img size='0.6' align='center' image='pic\star_green.paa' />";
} else {
_name=parseText "<img size='0.6' align='center' image='pic\star_blue.paa' />";
};
_pos=[_pos select 0,_pos select 1,(_pos select 2)+4];
};
if (_veh!=_x && {_x!=(effectiveCommander _veh)}) exitwith
{
_name=parseText "";
};
if (_veh==_x && {_dst<=600}) exitwith
{
_lifestate=_x getVariable "FFA_LIFESTATE";
_mask="";
if !(isnil ("_lifestate")) then
{
call
{
if (_lifestate == FFA_LIFESTATE_HEALTHY ) exitWith {if (_xgroup==_pgroup) then {_mask="<t size='%2' shadow='true' align='center' color='#00FF00'>%1</t>";}else{_mask="<t size='%2' shadow='true' align='center' color='#00BFFF'>%1</t>";};};
if (_lifestate == FFA_LIFESTATE_INJURED ) exitWith {_mask="<t size='%2' shadow='true' align='center' color='#eeee00'>%1</t>";};
if (_lifestate == FFA_LIFESTATE_WOUNDED ) exitWith {_mask="<t size='%2' shadow='true' align='center' color='#FF8C00'>%1</t>";};
if (_lifestate == FFA_LIFESTATE_DYING ) exitWith {_mask="<t size='%2' shadow='true' align='center' color='#FF0000'>%1</t>";};
if (_lifestate == FFA_LIFESTATE_DEAD ) exitWith {_mask="<t size='%2' shadow='true' align='center' color='#000000'>%1</t>";};
_mask="<t size='%2' shadow='true' align='center' color='#00FF00'>%1</t>";
};
} else {
_mask="<t size='%2' shadow='true' align='center' color='#000000'>%1</t>";
};
_relpos=_x modelToWorld (_x selectionPosition "camera");
if ((_relpos select 2)<0) then
{
_pos=[_pos select 0,_pos select 1,(_relpos select 2)+0.5];
} else {
_pos=[_pos select 0,_pos select 1,(_relpos select 2)+0.3];
};
_fsize1=0.8-(_dst*0.001);
_fsize=(round(_fsize1*10))/10;
_name=parseText format[_mask,_xname,_fsize,_fcolor];
};
if (_veh==_x && {_dst>600}) exitwith
{
_relpos=_x modelToWorld (_x selectionPosition "camera");
if ((_relpos select 2)<0) then
{
_pos=[_pos select 0,_pos select 1,(_relpos select 2)+0.5];
} else {
_pos=[_pos select 0,_pos select 1,(_relpos select 2)+0.3];
};
if (_xgroup==_pgroup) then
{
_name=parseText "<img size='0.6' align='center' image='pic\star_green.paa' />";
} else {
_name=parseText "<img size='0.6' align='center' image='pic\star_blue.paa' />";
};
};
};
_scrpos=worldToScreen _pos;
if ((count _scrpos)!=0) then
{
ctrlShow[_ctrlq,true];
_ctrlq ctrlSetStructuredText _name;
_ctrlq ctrlSetPosition [(_scrpos select 0)-0.125,_scrpos select 1];
_ctrlq ctrlCommit 0;
} else {
ctrlShow[_ctrlq,false];
_ctrlq ctrlSetStructuredText parseText "";
_ctrlq ctrlCommit 0;
};
} else {
ctrlShow[_ctrlq,false];
_ctrlq ctrlSetStructuredText parseText "";
_ctrlq ctrlCommit 0;
};
};
if (_currenttime<_t && {((lineIntersects [eyePos player,eyePos _veh,_veh,_pveh])||(terrainIntersectASL [eyePos player,eyePos _veh]))}) exitwith //
{
if (_veh!=_pveh) then
{
_dst=round (_veh distance _pveh);
_xname = name _veh;
_xgroup=group _x;
call
{
if (_veh!=_x && {_x==(effectiveCommander _veh)} && {_dst<=600}) exitwith
{
_fsize1=0.8-(_dst*0.001);
_fsize=(round(_fsize1*10))/10;
_text = gettext(configFile >> "CfgVehicles" >> (typeof _veh) >> "displayName");
_mask="<t size='%3' shadow='true' align='center' color='%4'>%1</t><br/><t size='%3' shadow='true' align='center' color='%5'>[%2]</t>";
if (_xgroup==_pgroup) then
{
_name=parseText format[_mask,_xname,_text,_fsize,"#00FF00","#FFFFFF"]; //осн цвет
} else {
_name=parseText format[_mask,_xname,_text,_fsize,"#00BFFF","#FFFFFF"];};
_pos=[_pos select 0,_pos select 1,(_pos select 2)+3.5];
};
if (_veh!=_x && {_x==(effectiveCommander _veh)} && {_dst>600}) exitwith
{
if (_xgroup==_pgroup) then
{
_name=parseText "<img size='0.6' align='center' image='pic\star_green.paa' />";
} else {
_name=parseText "<img size='0.6' align='center' image='pic\star_blue.paa' />";
};
_pos=[_pos select 0,_pos select 1,(_pos select 2)+4];
};
if (_veh!=_x && {_x!=(effectiveCommander _veh)}) exitwith
{
_name=parseText "";
};
if (_veh==_x && {_dst<=600}) exitwith
{
_lifestate=_x getVariable "FFA_LIFESTATE";
_mask="";
if !(isnil ("_lifestate")) then
{
call
{
if (_lifestate == FFA_LIFESTATE_HEALTHY ) exitWith {if (_xgroup==_pgroup) then {_mask="<t size='%2' shadow='true' align='center' color='#00FF00'>%1</t>";}else{_mask="<t size='%2' shadow='true' align='center' color='#00BFFF'>%1</t>";};};
if (_lifestate == FFA_LIFESTATE_INJURED ) exitWith {_mask="<t size='%2' shadow='true' align='center' color='#eeee00'>%1</t>";};
if (_lifestate == FFA_LIFESTATE_WOUNDED ) exitWith {_mask="<t size='%2' shadow='true' align='center' color='#FF8C00'>%1</t>";};
if (_lifestate == FFA_LIFESTATE_DYING ) exitWith {_mask="<t size='%2' shadow='true' align='center' color='#FF0000'>%1</t>";};
if (_lifestate == FFA_LIFESTATE_DEAD ) exitWith {_mask="<t size='%2' shadow='true' align='center' color='#000000'>%1</t>";};
_mask="<t size='%2' shadow='true' align='center' color='#00FF00'>%1</t>";
};
} else {
_mask="<t size='%2' shadow='true' align='center' color='#000000'>%1</t>";
};
_relpos=_x modelToWorld (_x selectionPosition "camera");
if ((_relpos select 2)<0) then
{
_pos=[_pos select 0,_pos select 1,(_relpos select 2)+0.5];
} else {
_pos=[_pos select 0,_pos select 1,(_relpos select 2)+0.3];
};
_fsize1=0.8-(_dst*0.001);
_fsize=(round(_fsize1*10))/10;
_name=parseText format[_mask,_xname,_fsize,_fcolor];
};
if (_veh==_x && {_dst>600}) exitwith
{
_relpos=_x modelToWorld (_x selectionPosition "camera");
if ((_relpos select 2)<0) then
{
_pos=[_pos select 0,_pos select 1,(_relpos select 2)+0.5];
} else {
_pos=[_pos select 0,_pos select 1,(_relpos select 2)+0.3];
};
if (_xgroup==_pgroup) then
{
_name=parseText "<img size='0.6' align='center' image='pic\star_green.paa' />";
} else {
_name=parseText "<img size='0.6' align='center' image='pic\star_blue.paa' />";
};
};
};
_scrpos=worldToScreen _pos;
if ((count _scrpos)!=0) then
{
ctrlShow[_ctrlq,true];
_ctrlq ctrlSetStructuredText _name;
_ctrlq ctrlSetPosition [(_scrpos select 0)-0.125,_scrpos select 1];
_ctrlq ctrlCommit 0;
} else {
ctrlShow[_ctrlq,false];
_ctrlq ctrlSetStructuredText parseText "";
_ctrlq ctrlCommit 0;
};
} else {
ctrlShow[_ctrlq,false];
_ctrlq ctrlSetStructuredText parseText "";
_ctrlq ctrlCommit 0;
};
//
};
ctrlShow[_ctrlq,false];
_ctrlq ctrlSetStructuredText parseText "";
_ctrlq ctrlCommit 0;
};
} else {
ctrlShow[_ctrlq,false];
_ctrlq ctrlSetStructuredText parseText "";
_ctrlq ctrlCommit 0;
};
} else {
_ctrlq = ((uiNamespace getVariable 'HDPU') displayCtrl (500 + _i));
ctrlShow[_ctrlq,false];
_ctrlq ctrlSetStructuredText parseText "";
_ctrlq ctrlCommit 0;
};
} else {
_ctrlq = ((uiNamespace getVariable 'HDPU') displayCtrl (500 + _i));
ctrlShow[_ctrlq,false];
_ctrlq ctrlSetStructuredText parseText "";
_ctrlq ctrlCommit 0;
};
};
if ((paramsArray select 21)!=0) then
{
//____________________________________________________
_grp=group player;
_unitsrgp=units _grp;
_grpcnt={isplayer _x} count _unitsrgp;
if (_grpcnt>=2) then
{
_ctrlq = ((uiNamespace getVariable 'HDPU') displayCtrl (500 + ffa_markers_playerslot));
for "_j" from 0 to _grpcnt-1 step 1 do
{
_unit= _unitsrgp select _j;
_lifestate=_unit getVariable "FFA_LIFESTATE";
if !(isnil ("_lifestate")) then
{
call
{
if (_lifestate == FFA_LIFESTATE_WOUNDED ) exitWith {_name=parseText "<img size='1.7' align='right' image='pic\t_x0.paa' />";_trouble=1;};
if (_lifestate == FFA_LIFESTATE_DYING ) exitWith {_name=parseText "<img size='1.7' align='right' image='pic\t_x0.paa' />";_trouble=1;};
};
} else {
_name=parseText "<img size='1.7' align='center' image='pic\t_x0.paa' />";
_trouble=1;
};
};
if (_trouble==0) then
{
_score=_grp getVariable ["FFA_SCORE",0]; //
_value=floor (_score/10);
call {
if (_value==0) exitWith {_name=parseText "<img size='1.7' align='right' image='pic\t_x1.paa' />";};
if (_value==1) exitWith {_name=parseText "<img size='1.7' align='right' image='pic\t_x2.paa' />";};
if (_value==2) exitWith {_name=parseText "<img size='1.7' align='right' image='pic\t_x3.paa' />";};
if (_value==3) exitWith {_name=parseText "<img size='1.7' align='right' image='pic\t_x4.paa' />";};
if (_value>=4) exitWith {_name=parseText "<img size='1.7' align='right' image='pic\t_x5.paa' />";};
};
};
x = safeZoneX + safeZoneW - 0.26;
y = safeZoneY + (safeZoneH*0.1);
ctrlShow[_ctrlq,true];
_ctrlq ctrlSetStructuredText _name;
_ctrlq ctrlSetPosition [x,y];
_ctrlq ctrlCommit 0;
}else {
_ctrlq = ((uiNamespace getVariable 'HDPU') displayCtrl (500 + ffa_markers_playerslot));
_score=_grp getVariable ["FFA_SCORE",0];
_value=floor (_score/10);
call {
if (_value==0) exitWith {_name=parseText "<img size='1.7' align='right' image='pic\s_x1.paa' />";};
if (_value==1) exitWith {_name=parseText "<img size='1.7' align='right' image='pic\s_x2.paa' />";};
if (_value==2) exitWith {_name=parseText "<img size='1.7' align='right' image='pic\s_x3.paa' />";};
if (_value==3) exitWith {_name=parseText "<img size='1.7' align='right' image='pic\s_x4.paa' />";};
if (_value==4) exitWith {_name=parseText "<img size='1.7' align='right' image='pic\s_x5.paa' />";};
};
x = safeZoneX + safeZoneW - 0.26;
y = safeZoneY + (safeZoneH*0.1);
ctrlShow[_ctrlq,true];
_ctrlq ctrlSetStructuredText _name;
_ctrlq ctrlSetPosition [x,y];
_ctrlq ctrlCommit 0;
};
};
} else {
for "_i" from 1 to FFA_COUNTPLAYERS do
{
_ctrlq = ((uiNamespace getVariable 'HDPU') displayCtrl (500 + _i));
ctrlShow[_ctrlq,false];
_ctrlq ctrlSetStructuredText parseText "";
_ctrlq ctrlCommit 0;
};
};
[markers] call ffa_func_markers;
if (!FFA_FFA_CONTROL && {alive player}) then {[] spawn FFA_FUNC_LAW;};
};