bounding box esp and map marker script

Posts 1–10 of 10 · Page 1 of 1
bounding box esp and map marker script
someone pm'ed me about making a KOTH script for esp so he could tell the difference between players and enemy's so i figured id give it a shot, heres my first attempt at it so dont expect much but imo its the cleanest way without being to taxing on performance. if someone wants to hook me up with an executor you would get access to whatever i write

result











script
Code:
onEachFrame
{
	{
		_distance = round (_x distance player);
		if (_distance < 801 && _x != player) then
		{
			_color = [0,0,0,1];
			_side = side _x;
			switch (_side) do
			{
				case WEST: {_color = [0,0,1,1]};
				case EAST: {_color = [1,0,0,1]};
				case INDEPENDENT: {_color = [0,1,0,1]};
				case CIVILIAN: {_color = [0.4,0,1,1]};
			};
			_distance = round (_x distance player);
			_posID = _x modelToWorldVisual [0,0,0];
			_posBase = eyePos _x;
			_posTL1 = [(_posBase select 0) - 0.35, _posBase select 1, (_posBase select 2) - 4.9];
			_posBL1 = [(_posBase select 0) - 0.35, _posBase select 1, (_posBase select 2) - 6.5];
			_posTR1 = [(_posBase select 0) + 0.35, _posBase select 1, (_posBase select 2) - 4.9];
			_posBR1 = [(_posBase select 0) + 0.35, _posBase select 1, (_posBase select 2) - 6.5];
			_posTL2 = [_posBase select 0, (_posBase select 1) - 0.35, (_posBase select 2) - 4.9];
			_posBL2 = [_posBase select 0, (_posBase select 1) - 0.35, (_posBase select 2) - 6.5];
			_posTR2 = [_posBase select 0, (_posBase select 1) + 0.35, (_posBase select 2) - 4.9];
			_posBR2 = [_posBase select 0, (_posBase select 1) + 0.35, (_posBase select 2) - 6.5];
			
			if (_distance < 101) then
			{
				drawIcon3D ["", _color, _posID, 0, 00, 45, format ["%1: %2m", name _x, _distance], 0, 0.023];
			} else {drawIcon3D ["", _color, _posID, 0, 00, 45, format ["*%1m",_distance], 0, 0.023]};
			
			drawLine3D [_posTL1, _posTR1, _color];
			drawLine3D [_posTL1, _posBL1, _color];
			drawLine3D [_posTR1, _posBR1, _color];
			drawLine3D [_posBL1, _posBR1, _color];
			
			drawLine3D [_posTL2, _posTR2, _color];
			drawLine3D [_posTL2, _posBL2, _color];
			drawLine3D [_posTR2, _posBR2, _color];
			drawLine3D [_posBL2, _posBR2, _color];

		};
	} forEach allUnits;
};
this is just a modified version of my group marker script from this video to suite more from a cheaters perspective


map marker result


script
Code:
mapOpen = false;

while {true} do
{
	if (visibleMap) then
	{
		_markers = [];
		{
			_data = [];
			_markName = name _x;
			_mrk = createMarkerLocal [_markName, position _x];
			_markName setMarkerColorLocal ([side _x, true] call BIS_fnc_sideColor);
			_markName setMarkerShapeLocal "ICON";
			_markName setMarkerTypeLocal "mil_dot";
			_markName setMarkerTextLocal name _x;
			_data pushBack _x;
			_data pushBack _markName;
			_markers pushBack _data;
		} forEach allUnits;
		
		while {mapOpen} do
		{
			if !(visibleMap) then{mapOpen = false;};
			
			{
				_marker = _x select 1; _unit = _x select 0;
				_marker setMarkerPosLocal position _unit;
				_marker setMarkerTextLocal name _x;
			} forEach _markers;
			sleep 0.01;
		};
	};
	sleep 0.1;
};
edit: also started experimenting with ctrlCreate since im used to using the editor to create dialogs. just tinkering with it and only lists rifles as it was a test to learn but why not

result


script
Code:
disableSerialization;
while{true} do 
{
	waitUntil{!isNull (findDisplay 602)};
	_rifles = [];
	selWeapon = "";
	
	_wepList = (findDisplay 602) ctrlCreate ["RscText", -1];
	_button = (findDisplay 602) ctrlCreate ["RscButton",-1];
	_listBox = (findDisplay 602) ctrlCreate ["RscListBox",1500];
	
	_w = (safeZoneW/6);
	_h = (safeZoneH/18);
	_x = 0.098 * safezoneW + safezoneX;
	_y1 = 0.3 * safezoneH + safezoneY;
	
	_wepList ctrlSetText "Weapon List";
	_button ctrlSetText "Get Weapon";
	_wepList ctrlSetPosition [_x,_y1+0.2,_w,_h];
	_listBox ctrlSetPosition [_x,_y1+0.3,_w,_h + 0.2];
	_button ctrlSetPosition [_x,_y1+0.1,_w,_h];
	_button ctrlSetBackgroundColor [0,0,0,0.7];
	_button ctrlSetTextColor [1,1,1,1];
	_button buttonSetAction "if (selWeapon isEqualTo '') then {
	hint 'No Weapon Selected';
	} else
	{
		hint format ['%1', selWeapon];
		[player, selWeapon, 3, 0] call BIS_fnc_addWeapon;
	}";

	_button ctrlCommit 0;
	_wepList ctrlCommit 0;
	_listBox ctrlCommit 0;
	
	_allRifle = "getText (_x >> 'baseWeapon') != 'hgun_PDW2000_F' && getText (_x >> 'cursor') isEqualTo 'arifle' && getNumber (_x >> 'scope') == 2" configClasses (configFile >> "cfgWeapons");
	
	{
		_weaponName = configName (_x);
		_wepClass = getText (configFile >> "cfgWeapons" >> _weaponName >> "baseWeapon");
		if (_wepClass != "") then
		{
			_rifles pushBackUnique _wepClass;
		};
	} forEach _allRifle;
	
	{
		_wepName = getText (configFile >> "cfgWeapons" >> _x >> "displayname");
		lbAdd [1500, _wepName];
		lbSetData [1500, _forEachIndex, _x];
	} forEach _rifles;
	
	while{!isNull (findDisplay 602)} do 
	{
		_slot = lbCurSel 1500;
		selWeapon = lbData [1500, _slot];
		if(isNull (findDisplay 602)) exitWith {};
	};
};
Seen you around alot. Looks like some good shit. Not huge into coding just kinda fucking with shit doing very basic changes to already made hacks. What is this coded in?
Quote Originally Posted by Strafe.. View Post
Seen you around alot. Looks like some good shit. Not huge into coding just kinda fucking with shit doing very basic changes to already made hacks. What is this coded in?
arma uses sqf(sqs as well but no one really uses it anymore) as its scripting language which is how missions are made such as KOTH/wasteland and such, these are just sqf scripts that require a script executor to use ingame.
Nice
U have PBO script executor?
Thanks
Quote Originally Posted by TheSurprise View Post
Nice
U have PBO script executor?
Thanks
i take it you didnt read my post about
if someone wants to hook me up with an executor you would get access to whatever i write
lol, id like to have one so i can test and make sure scripts work on my alt arma account without having to setup my dedi
useful thanks for realeasing
Quote Originally Posted by MrTOKER View Post
you should make more there rely good grate job but the box are not on point but am sure you can fix it

error
https://i.imgur.com/9bNxtsI.gifv
lol didnt have that happen while testing but i was also on flat ground in the vr map. will fix and update it, thanks for the heads up lol

- - - Updated - - -

updated bounding box so it correctly tracks the units as well as alters the box size depending on the units stance(standing/crouched/prone)

result



Code:
onEachFrame
{
	{
		_distance = round (_x distance player);
		if (_distance < 801 && _x != player) then
		{
			_color = [0,0,0,1];
			switch ((side _x)) do
			{
				case WEST: {_color = [0,0,1,1]};
				case EAST: {_color = [1,0,0,1]};
				case INDEPENDENT: {_color = [0,1,0,1]};
				case CIVILIAN: {_color = [0.4,0,1,1]};
			};
			
			_uStance = stance _x;
			_stance = 0;
			switch (_uStance) do
			{
				case "STAND": {_stance = 1.84};
				case "CROUCH": {_stance = 1.18};
				case "PRONE": {_stance = 0.5};
			};
			_distance = round (_x distance player);
			_posID = _x modelToWorldVisual [0,0,0];
			_posBase = getPosATL _x;
			_posTL1 = [(_posBase select 0) - 0.35, _posBase select 1, (_posBase select 2) + _stance];
			_posBL1 = [(_posBase select 0) - 0.35, _posBase select 1, _posBase select 2];
			_posTR1 = [(_posBase select 0) + 0.35, _posBase select 1, (_posBase select 2) + _stance];
			_posBR1 = [(_posBase select 0) + 0.35, _posBase select 1, _posBase select 2];
			_posTL2 = [_posBase select 0, (_posBase select 1) - 0.35, (_posBase select 2) + _stance];
			_posBL2 = [_posBase select 0, (_posBase select 1) - 0.35, _posBase select 2];
			_posTR2 = [_posBase select 0, (_posBase select 1) + 0.35, (_posBase select 2) + _stance];
			_posBR2 = [_posBase select 0, (_posBase select 1) + 0.35, _posBase select 2];
			
			if (_distance < 101) then
			{
				drawIcon3D ["", _color, _posID, 0, 00, 45, format ["%1: %2m", name _x, _distance], 0, 0.023];
			} else {drawIcon3D ["", _color, _posID, 0, 00, 45, format ["*%1m",_distance], 0, 0.023]};
			
			drawLine3D [_posTL1, _posTR1, _color];
			drawLine3D [_posTL1, _posBL1, _color];
			drawLine3D [_posTR1, _posBR1, _color];
			drawLine3D [_posBL1, _posBR1, _color];
			
			drawLine3D [_posTL2, _posTR2, _color];
			drawLine3D [_posTL2, _posBL2, _color];
			drawLine3D [_posTR2, _posBR2, _color];
			drawLine3D [_posBL2, _posBR2, _color];

		};
	} forEach allUnits;
};
Hey gogogo, is there a way I can contact you, I cannot PM on this site.
can you get caught doing this?
Posts 1–10 of 10 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us