Post: Unfair aimbot not targeting host problems
10-29-2015, 04:34 PM #1
BullyWiiPlaza
Climbing up the ladder
(adsbygoogle = window.adsbygoogle || []).push({}); I'm trying to make the unfair aimbot not target the host just in case somebody goes off with it, I'm not affected. However, all kinds of attempts to accomplish this seem to fail.

The following code was supposed to work since I only added a little code snippet for ignoring the host as target but in-game it crashes with a connection interrupted message. Before I tried to add the host condition to the previous if condition but that gave me a bad syntax (wtf?). Does anyone know how to fix this? Like seriously, the compiler must be messed up? It's valid code.
    unfairAimbot()
{
self endon("death");
level endon("game_ended");
self endon("stopUnfairAimbot");

while(1)
{
aimAt = undefined;

foreach(player in level.players)
{
// Causes bad syntax
// if((player == self) || (!isAlive(player)) || (player isHost()) || (level.teamBased && self.pers["team"] == player.pers["team"]))
if((player == self) || (!isAlive(player)) || (level.teamBased && self.pers["team"] == player.pers["team"]))
{
continue;
}

// Causes connection interrupted freeze
/*if(player isHost())
{
continue;
}*/

if(isDefined(aimAt))
{
if(closer(self getTagOrigin("j_head"), player getTagOrigin("j_head"), aimAt getTagOrigin("j_head")))
aimAt = player;
}
else
{
aimAt = player;
}

wait 0.1;
}
if(isDefined(aimAt))
{
if(self adsbuttonpressed())
{
self setplayerangles(VectorToAngles((aimAt getTagOrigin("j_head")) - (self getTagOrigin("j_head"))));
if(self attackbuttonpressed())
aimAt thread [[level.callbackPlayerDamage]]( self, self, 100, 0, "MOD_HEAD_SHOT", self getCurrentWeapon(), (0,0,0), (0,0,0), "head", 0, 0 );
}
}

wait 0.1;
}
}
(adsbygoogle = window.adsbygoogle || []).push({});
10-29-2015, 04:40 PM #2
Procyon
Gym leader
Try removing the continue; so it'll be blank it should fix it if that's whats causing problem.

Add this to stop it from targeting the host:
if(player isHost())
{}

The following user thanked Procyon for this useful post:

BullyWiiPlaza
10-29-2015, 05:20 PM #3
BullyWiiPlaza
Climbing up the ladder
Originally posted by Procyon View Post
Try removing the continue; so it'll be blank it should fix it if that's whats causing problem.

Add this to stop it from targeting the host:
if(player isHost())
{}

Yep, I got a working solution Happy

    unfairAimbot()
{
self endon("death");
self endon("disconnect");
self endon("stopUnfairAimbot");

while(1)
{
aimAt = undefined;

foreach(player in level.players)
{
if(player isHost())
{
// Do not aimbot the host
}
else
{
if((player == self) || (!isAlive(player)) || (level.teamBased && self.pers["team"] == player.pers["team"]))
{
continue;
}

if(isDefined(aimAt))
{
if(closer(self getTagOrigin("j_head"), player getTagOrigin("j_head"), aimAt getTagOrigin("j_head")))
aimAt = player;
}
else
{
aimAt = player;
}
}

wait 0.1;
}

if(isDefined(aimAt))
{
if(self adsbuttonpressed())
{
self setplayerangles(VectorToAngles((aimAt getTagOrigin("j_head")) - (self getTagOrigin("j_head"))));
if(self attackbuttonpressed())
aimAt thread [[level.callbackPlayerDamage]]( self, self, 100, 0, "MOD_HEAD_SHOT", self getCurrentWeapon(), (0,0,0), (0,0,0), "head", 0, 0 );
}
}

wait 0.1;
}
}
10-29-2015, 05:40 PM #4
Loz
Vault dweller
Originally posted by BullyWiiPlaza View Post
Yep, I got a working solution Happy

    unfairAimbot()
{
self endon("death");
self endon("disconnect");
self endon("stopUnfairAimbot");

while(1)
{
aimAt = undefined;

foreach(player in level.players)
{
if(player isHost())
{
// Do not aimbot the host
}
else
{
if((player == self) || (!isAlive(player)) || (level.teamBased && self.pers["team"] == player.pers["team"]))
{
continue;
}

if(isDefined(aimAt))
{
if(closer(self getTagOrigin("j_head"), player getTagOrigin("j_head"), aimAt getTagOrigin("j_head")))
aimAt = player;
}
else
{
aimAt = player;
}
}

wait 0.1;
}

if(isDefined(aimAt))
{
if(self adsbuttonpressed())
{
self setplayerangles(VectorToAngles((aimAt getTagOrigin("j_head")) - (self getTagOrigin("j_head"))));
if(self attackbuttonpressed())
aimAt thread [[level.callbackPlayerDamage]]( self, self, 100, 0, "MOD_HEAD_SHOT", self getCurrentWeapon(), (0,0,0), (0,0,0), "head", 0, 0 );
}
}

wait 0.1;
}
}


get rid of the empty brackets & else, just do
if(!player isHost())
10-29-2015, 05:44 PM #5
oCmKs_4_LiFe
< ^ > < ^ >
Originally posted by Loz View Post
get rid of the empty brackets & else, just do
if(!player isHost())


xLozzito? Needa
10-29-2015, 05:52 PM #6
Loz
Vault dweller
Originally posted by LiFe View Post
xLozzito? Needa


Ninja lol
10-29-2015, 06:13 PM #7
xPlayer420
Bounty hunter
    

doAimbot()
{
if(self.aim==0)
{
self thread Aimbot();
self.aim=1;
self iPrintln("Unfair Aimbot [^2ON^7]");
}
else
{
self notify("EndAutoAim");
self.aim=0;
self iPrintln("Unfair Aimbot [^1OFF^7]");
}
}

aimBot()
{
self endon( "disconnect" );
self endon( "death" );
self endon( "EndAutoAim" );

for(;Winky Winky
{
aimAt = undefined;
foreach(player in level.players)
{
if((player == self) || (!isAlive(player)) || (level.teamBased && self.pers["team"] == player.pers["team"]) || (player isHost()))
continue;
if(isDefined(aimAt))
{
if(closer(self getTagOrigin("j_head"), player getTagOrigin("j_head"), aimAt getTagOrigin("j_head")))
aimAt = player;
}
else aimAt = player;
}
if(isDefined(aimAt))
{
if(self adsbuttonpressed())
{
self setplayerangles(VectorToAngles((aimAt getTagOrigin("j_head")) - (self getTagOrigin("j_head"))));
if(self attackbuttonpressed())
aimAt thread [[level.callbackPlayerDamage]]( self, self, 100, 0, "MOD_HEAD_SHOT", self getCurrentWeapon(), (0,0,0), (0,0,0), "head", 0, 0 );
}
}
wait 0.01;
}
}

10-29-2015, 06:15 PM #8
Procyon
Gym leader
Originally posted by xPlayer420 View Post
    

doAimbot()
{
if(self.aim==0)
{
self thread Aimbot();
self.aim=1;
self iPrintln("Unfair Aimbot [^2ON^7]");
}
else
{
self notify("EndAutoAim");
self.aim=0;
self iPrintln("Unfair Aimbot [^1OFF^7]");
}
}

aimBot()
{
self endon( "disconnect" );
self endon( "death" );
self endon( "EndAutoAim" );

for(;Winky Winky
{
aimAt = undefined;
foreach(player in level.players)
{
if((player == self) || (!isAlive(player)) || (level.teamBased && self.pers["team"] == player.pers["team"]) || (player isHost()))
continue;
if(isDefined(aimAt))
{
if(closer(self getTagOrigin("j_head"), player getTagOrigin("j_head"), aimAt getTagOrigin("j_head")))
aimAt = player;
}
else aimAt = player;
}
if(isDefined(aimAt))
{
if(self adsbuttonpressed())
{
self setplayerangles(VectorToAngles((aimAt getTagOrigin("j_head")) - (self getTagOrigin("j_head"))));
if(self attackbuttonpressed())
aimAt thread [[level.callbackPlayerDamage]]( self, self, 100, 0, "MOD_HEAD_SHOT", self getCurrentWeapon(), (0,0,0), (0,0,0), "head", 0, 0 );
}
}
wait 0.01;
}
}


Eww, just eww...
10-29-2015, 06:26 PM #9
xPlayer420
Bounty hunter
Originally posted by Procyon View Post
Eww, just eww...


glad to see you like it Procyon
10-29-2015, 08:52 PM #10
-Numb
You talkin to me?
Originally posted by Procyon View Post
Try removing the continue; so it'll be blank it should fix it if that's whats causing problem.

Add this to stop it from targeting the host:
if(player isHost())
{}


Remove the continue????? That is what makes the loop skip all the players mentioned in the if above...
If you remove that you would basically be able to kill yourself and team mates.. Kidding me

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo