Code:
if (isnil("aim")) then {
aim = 0;
};
if (aim == 0) then {
aim = 1;
hint "WallHack On";
} else {
aim = 0;
hint "WallHack Off";
};
if (aim == 1) then {
onEachFrame {
_B0BSuck = nearestobjects[player, ["CAManBase"], 1400]; {
if ((side _x != side player) && (getPlayerUID _x != "") && ((player distance _x) < 1400)) then {
drawIcon3D["", [0,0,0,1], [visiblePosition _x select 0, visiblePosition _x select 1, 2], 0, 0, 45, (format["%2 : %1m", round(player distance _x), name _x]), 1, 0.025, "PuristaMedium"]
} else {
if ((getPlayerUID _x != "") && ((player distance _x) < 1000)) then {
drawIcon3D["", [0,0,0,1], [visiblePosition _x select 0, visiblePosition _x select 1, 2], 0, 0, 45, (format["%2 : %1m", round(player distance _x), name _x]), 1, 0.025, "PuristaMedium"]
};
};
} foreach AllUnits;
_color = [0.035,1,0,1];
_color6 = [1,0,0,1];
_x1 = -0.5;
_y1 = -0.5;
_z1 = 0;
_x2 = 0.5;
_y2 = 0.5;
_z2 = 1.8;
_noobs = nearestobjects [player,["CAManBase"],1000];
{
if(((alive _x)) && ((player distance _x) < 1000)) then
{
if((side _x != side player) && ((player distance _x) < 1000)) then
{
if(player distance _x < 1000 && _x iskindof "CAManBase") then
{
drawLine3d [_x modelToWorld [_x1, _y1, 1], _x modelToWorld [0,0,_z2], _color6];
drawLine3d [_x modelToWorld [_x2, _y1, 1], _x modelToWorld [0,0,_z2], _color6];
drawLine3d [_x modelToWorld [_x2, _y2, 1], _x modelToWorld [0,0,_z2], _color6];
drawLine3d [_x modelToWorld [_x1, _y2, 1], _x modelToWorld [0,0,_z2], _color6];
drawLine3d [_x modelToWorld [_x1, _y1, 1], _x modelToWorld [0, 0, _z1], _color6];
drawLine3d [_x modelToWorld [_x2, _y1, 1], _x modelToWorld [0, 0, _z1], _color6];
drawLine3d [_x modelToWorld [_x2, _y2, 1], _x modelToWorld [0, 0, _z1], _color6];
drawLine3d [_x modelToWorld [_x1, _y2, 1], _x modelToWorld [0, 0, _z1], _color6];
drawLine3d [_x modelToWorld [_x1, _y1, 1], _x modelToWorld [_x2, _y1, 1], _color6];
drawLine3d [_x modelToWorld [_x2, _y1, 1], _x modelToWorld [_x2, _y2, 1], _color6];
drawLine3d [_x modelToWorld [_x2, _y2, 1], _x modelToWorld [_x1, _y2, 1], _color6];
drawLine3d [_x modelToWorld [_x1, _y2, 1], _x modelToWorld [_x1, _y1, 1], _color6];
drawLine3d [[getposatl player select 0, getposatl player select 1, getposatl player select 2],ASLToATL eyePos _x,_color6];
};
}
else
{
if(player distance _x < 1000 && _x iskindof "CAManBase" && side _x != civilian) then
{
drawLine3d [_x modelToWorld [_x1, _y1, 1], _x modelToWorld [0,0,_z2], _color];
drawLine3d [_x modelToWorld [_x2, _y1, 1], _x modelToWorld [0,0,_z2], _color];
drawLine3d [_x modelToWorld [_x2, _y2, 1], _x modelToWorld [0,0,_z2], _color];
drawLine3d [_x modelToWorld [_x1, _y2, 1], _x modelToWorld [0,0,_z2], _color];
drawLine3d [_x modelToWorld [_x1, _y1, 1], _x modelToWorld [0, 0, _z1], _color];
drawLine3d [_x modelToWorld [_x2, _y1, 1], _x modelToWorld [0, 0, _z1], _color];
drawLine3d [_x modelToWorld [_x2, _y2, 1], _x modelToWorld [0, 0, _z1], _color];
drawLine3d [_x modelToWorld [_x1, _y2, 1], _x modelToWorld [0, 0, _z1], _color];
drawLine3d [_x modelToWorld [_x1, _y1, 1], _x modelToWorld [_x2, _y1, 1], _color];
drawLine3d [_x modelToWorld [_x2, _y1, 1], _x modelToWorld [_x2, _y2, 1], _color];
drawLine3d [_x modelToWorld [_x2, _y2, 1], _x modelToWorld [_x1, _y2, 1], _color];
drawLine3d [_x modelToWorld [_x1, _y2, 1], _x modelToWorld [_x1, _y1, 1], _color];
drawLine3d [[getposatl player select 0, getposatl player select 1, getposatl player select 2],ASLToATL eyePos _x,_color];
drawIcon3D["", [1,0,0,0.251], [visiblePosition _x select 0, visiblePosition _x select 1, 2], 0.25, 0.25, 45,"", 1, 0.025, ""]
};
};
};
} foreach AllUnits;
};
} else {
onEachFrame {
nil
};
};