Author Topic: Arma 2 and Oa Esp script  (Read 5769 times)

0 Members and 1 Guest are viewing this topic.

MrMedic

  • MasstKer
  • ********
  • Posts: 8900
  • programmer/dev/software engineer
    • View Profile
Arma 2 and Oa Esp script
« on: January 28, 2011, 02:52:04 pm »
Code: [Select]
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 :)
EnCoded Message: i3iy9yl8kr2xf3g2Txs3pr6ye3ya7jg5ty2z

https://www.youtube.com/watch?v=62_7-AYfdkQ
you need a paypal account for the private versions.

Website:
http://bit.ly/medic101

Teamspeak 3: 85.236.101.5:10157

seregavlg

  • Cheater Apprentice
  • *
  • Posts: 19
    • View Profile
Re: Arma 2 and Oa Esp script
« Reply #1 on: February 12, 2011, 11:30:07 pm »
please little manual,  if possible

MrMedic

  • MasstKer
  • ********
  • Posts: 8900
  • programmer/dev/software engineer
    • View Profile
Re: Arma 2 and Oa Esp script
« Reply #2 on: February 13, 2011, 03:33:52 am »
create dialogs call it.
« Last Edit: February 13, 2011, 04:33:11 am by MrMedic »
EnCoded Message: i3iy9yl8kr2xf3g2Txs3pr6ye3ya7jg5ty2z

https://www.youtube.com/watch?v=62_7-AYfdkQ
you need a paypal account for the private versions.

Website:
http://bit.ly/medic101

Teamspeak 3: 85.236.101.5:10157

jihad11

  • Online Villain
  • ***
  • Posts: 106
  • Im a bot DING DONG
    • View Profile
Re: Arma 2 and Oa Esp script
« Reply #3 on: February 16, 2011, 09:51:12 pm »
cant u just create and upload it ;x ?

Fury

  • Online Villain
  • ***
  • Posts: 124
  • i̺͇̯̟̗m̤̬p͈̠̖o̫̭̦̼ͅrt͈̝̞ antigravity
    • View Profile
Re: Arma 2 and Oa Esp script
« Reply #4 on: February 16, 2011, 10:00:13 pm »
please little manual,  if possible

create dialogs call it.

I believe he is asking you to explain how you create dialogs. Not everyone is familiar with ARMA's files and the modification thereof. I bet you that seregavlg doesn't even know where to look.

A proper tutorial on how to create dialogs would not be out of place.

-Fury.
My programming language is common sense and communication. ♥

MrMedic

  • MasstKer
  • ********
  • Posts: 8900
  • programmer/dev/software engineer
    • View Profile
Re: Arma 2 and Oa Esp script
« Reply #5 on: February 16, 2011, 11:48:28 pm »
« Last Edit: February 16, 2011, 11:54:56 pm by MrMedic »
EnCoded Message: i3iy9yl8kr2xf3g2Txs3pr6ye3ya7jg5ty2z

https://www.youtube.com/watch?v=62_7-AYfdkQ
you need a paypal account for the private versions.

Website:
http://bit.ly/medic101

Teamspeak 3: 85.236.101.5:10157

jihad11

  • Online Villain
  • ***
  • Posts: 106
  • Im a bot DING DONG
    • View Profile
Re: Arma 2 and Oa Esp script
« Reply #6 on: February 17, 2011, 12:18:13 am »
My problem is , my english skills arent the best ;b and im a bit lazy atm .. Dont flame at me now pls ! :)

If some1 Will finish this , pls upload it ;p

seregavlg

  • Cheater Apprentice
  • *
  • Posts: 19
    • View Profile
Re: Arma 2 and Oa Esp script
« Reply #7 on: February 26, 2011, 01:18:38 pm »
MrMedic dialogs id number should be from 1900 to 1991?

seregavlg

  • Cheater Apprentice
  • *
  • Posts: 19
    • View Profile
Re: Arma 2 and Oa Esp script
« Reply #8 on: February 26, 2011, 01:21:55 pm »
and why you change IDCPlayer to 1900 ...

MrMedic

  • MasstKer
  • ********
  • Posts: 8900
  • programmer/dev/software engineer
    • View Profile
Re: Arma 2 and Oa Esp script
« Reply #9 on: February 26, 2011, 02:53:21 pm »
get it working and see , ps this is old now i have a much better/faster esp.
EnCoded Message: i3iy9yl8kr2xf3g2Txs3pr6ye3ya7jg5ty2z

https://www.youtube.com/watch?v=62_7-AYfdkQ
you need a paypal account for the private versions.

Website:
http://bit.ly/medic101

Teamspeak 3: 85.236.101.5:10157

seregavlg

  • Cheater Apprentice
  • *
  • Posts: 19
    • View Profile
Re: Arma 2 and Oa Esp script
« Reply #10 on: March 02, 2011, 05:29:44 pm »
i'm surrender, i not good know arma lang for this

seregavlg

  • Cheater Apprentice
  • *
  • Posts: 19
    • View Profile
Re: Arma 2 and Oa Esp script
« Reply #11 on: March 03, 2011, 01:13:50 pm »
MrMedic how you debug arma scripts?  , ... hint "";  ок debug console ?  or ?

MrMedic

  • MasstKer
  • ********
  • Posts: 8900
  • programmer/dev/software engineer
    • View Profile
Re: Arma 2 and Oa Esp script
« Reply #12 on: March 03, 2011, 03:07:06 pm »
try this -showScriptErrors put it in the shortcut for arma 2 or oa
EnCoded Message: i3iy9yl8kr2xf3g2Txs3pr6ye3ya7jg5ty2z

https://www.youtube.com/watch?v=62_7-AYfdkQ
you need a paypal account for the private versions.

Website:
http://bit.ly/medic101

Teamspeak 3: 85.236.101.5:10157

Double Hack

  • Klass Klown
  • ***
  • Posts: 254
  • Do a barrel roll
    • View Profile
Re: Arma 2 and Oa Esp script
« Reply #13 on: March 03, 2011, 07:36:25 pm »
try this -showScriptErrors put it in the shortcut for arma 2 or oa

useful that


Double H-a-c-k, the Original Spoof clown XD

MrMedic

  • MasstKer
  • ********
  • Posts: 8900
  • programmer/dev/software engineer
    • View Profile
Re: Arma 2 and Oa Esp script
« Reply #14 on: March 04, 2011, 01:07:38 pm »
lu lu lu luuuluuuluuu luuu ( ewok song )
EnCoded Message: i3iy9yl8kr2xf3g2Txs3pr6ye3ya7jg5ty2z

https://www.youtube.com/watch?v=62_7-AYfdkQ
you need a paypal account for the private versions.

Website:
http://bit.ly/medic101

Teamspeak 3: 85.236.101.5:10157