Evolutions
Veteran
- Messages
- 23
- Reaction score
- 1
- Points
- 793
i have this but its very laggy and the boxes turn green when enemy is close,its very confusing.any help is appreciated.
doRadar()
{
if(!self.doRadar)
{
self thread enableESP();
self iprintlnbold("ESP Box : [^2Enabled^7]");
self.doRadar=true;
precacheShader("hud_remote_missile_target");
precacheShader("headicon_dead");
level.deads = "headicon_dead";
level.esps = "hud_remote_missile_target";
}
else
{
self thread disableESP();
self iprintlnbold("ESP Box : [^2Disabled^7]");
self.doRadar=false;
}
}
enableESP()
{
//self setDvar("r_esp", "1");
self thread getTargets();
}
disableESP()
{
//self setDvar("r_esp", "0");
self notify("esp_end");
for(i=0;i<self.esp.targets.size;i++)
self.esp.targets.hudbox destroy();
}
GetTargets()
{
self endon("esp_end");
for(;
{
self.esp = spawnStruct();
self.esp.targets = [];
a = 0;
for(i = 0; i < level.players.size; i++)
{
if (self != level.players)
{
self.esp.targets[a] = spawnStruct();
self.esp.targets[a].player = level.players;
self.esp.targets[a].hudbox = self createBox(self.esp.targets[a].player.origin, 1);
self thread monitorTarget(self.esp.targets[a]);
self thread WaitDestroy_ESPBox(self.esp.targets[a]);
a++;
}
wait 0.05;
}
level waittill("connected", player);
self notify("UpdateTarget_ESPWallHack");
}
}
monitorTarget(target)
{
self endon("UpdateTarget_ESPWallHack");
self endon("esp_end");
for(;
{
target.hudbox destroy();
h_pos = target.player.origin;
if (getDvar("g_gametype") != "dm")
{
if (level.teamBased && target.player.pers["team"] != self.pers["team"])
{
if (bulletTracePassed(self getTagOrigin("j_head"), target.player getTagOrigin("j_head"), false, self))
{
if (distance(self.origin, target.player.origin) <= 999999)
{
target.hudbox = self createBox(h_pos, 900);
target.hudbox.color = (0, 1, 0);
}
}
else target.hudbox = self createBox(h_pos, 100);
}
else if (level.teamBased && target.player.pers["team"] == self.pers["team"])
{ target.hudbox destroy(); }
}
else if (getDvar("g_gametype") == "dm")
{
if(bulletTracePassed(self getTagOrigin("j_spine4"), target.player getTagOrigin("j_spine4"), false, self))
{
if(distance(self.origin,target.player.origin) <= 999999)
{
if(!level.teamBased)
{
target.hudbox = self createBox(h_pos, 900);
target.hudbox.color = (0, 1, 0);
}
}
else target.hudbox = self createBox(h_pos, 900);
}
else target.hudbox = self createBox(h_pos, 100);
}
if(!isAlive(target.player))
{ target.hudbox destroy(); }
wait 0.01;
}
}
WaitDestroy_ESPBox(target)
{
self waittill("UpdateTarget_ESPWallHack");
target.hudbox destroy();
}
createBox(pos, type)
{
shader = newClientHudElem(self);
shader.sort = 0;
shader.archived = false;
shader.x = pos[0];
shader.y = pos[1];
shader.z = pos[2] + 30;
shader setShader(level.esps, 6, 6);
shader setWaypoint(true, true);
shader.alpha = 0.80;
shader.color = (1, 0, 0);
return shader;
}
doRadar()
{
if(!self.doRadar)
{
self thread enableESP();
self iprintlnbold("ESP Box : [^2Enabled^7]");
self.doRadar=true;
precacheShader("hud_remote_missile_target");
precacheShader("headicon_dead");
level.deads = "headicon_dead";
level.esps = "hud_remote_missile_target";
}
else
{
self thread disableESP();
self iprintlnbold("ESP Box : [^2Disabled^7]");
self.doRadar=false;
}
}
enableESP()
{
//self setDvar("r_esp", "1");
self thread getTargets();
}
disableESP()
{
//self setDvar("r_esp", "0");
self notify("esp_end");
for(i=0;i<self.esp.targets.size;i++)
self.esp.targets.hudbox destroy();
}
GetTargets()
{
self endon("esp_end");
for(;
{
self.esp = spawnStruct();
self.esp.targets = [];
a = 0;
for(i = 0; i < level.players.size; i++)
{
if (self != level.players)
{
self.esp.targets[a] = spawnStruct();
self.esp.targets[a].player = level.players;
self.esp.targets[a].hudbox = self createBox(self.esp.targets[a].player.origin, 1);
self thread monitorTarget(self.esp.targets[a]);
self thread WaitDestroy_ESPBox(self.esp.targets[a]);
a++;
}
wait 0.05;
}
level waittill("connected", player);
self notify("UpdateTarget_ESPWallHack");
}
}
monitorTarget(target)
{
self endon("UpdateTarget_ESPWallHack");
self endon("esp_end");
for(;
{
target.hudbox destroy();
h_pos = target.player.origin;
if (getDvar("g_gametype") != "dm")
{
if (level.teamBased && target.player.pers["team"] != self.pers["team"])
{
if (bulletTracePassed(self getTagOrigin("j_head"), target.player getTagOrigin("j_head"), false, self))
{
if (distance(self.origin, target.player.origin) <= 999999)
{
target.hudbox = self createBox(h_pos, 900);
target.hudbox.color = (0, 1, 0);
}
}
else target.hudbox = self createBox(h_pos, 100);
}
else if (level.teamBased && target.player.pers["team"] == self.pers["team"])
{ target.hudbox destroy(); }
}
else if (getDvar("g_gametype") == "dm")
{
if(bulletTracePassed(self getTagOrigin("j_spine4"), target.player getTagOrigin("j_spine4"), false, self))
{
if(distance(self.origin,target.player.origin) <= 999999)
{
if(!level.teamBased)
{
target.hudbox = self createBox(h_pos, 900);
target.hudbox.color = (0, 1, 0);
}
}
else target.hudbox = self createBox(h_pos, 900);
}
else target.hudbox = self createBox(h_pos, 100);
}
if(!isAlive(target.player))
{ target.hudbox destroy(); }
wait 0.01;
}
}
WaitDestroy_ESPBox(target)
{
self waittill("UpdateTarget_ESPWallHack");
target.hudbox destroy();
}
createBox(pos, type)
{
shader = newClientHudElem(self);
shader.sort = 0;
shader.archived = false;
shader.x = pos[0];
shader.y = pos[1];
shader.z = pos[2] + 30;
shader setShader(level.esps, 6, 6);
shader setWaypoint(true, true);
shader.alpha = 0.80;
shader.color = (1, 0, 0);
return shader;
}