04-19-2013, 17:06
Could someone help me getting like an Aimangle / AimFOV for this autoaim please?
--> kill closest enemy to crosshair when im shooting next to him like 3 - 5 degree.
visibilty check and random aimbone whould be nice too ;P but most important for me is aimangle/fov
because atm it's like i can shoot ANYwhere and get 1 or more headshot kills and this kinda sucks ;D
--> kill closest enemy to crosshair when im shooting next to him like 3 - 5 degree.
visibilty check and random aimbone whould be nice too ;P but most important for me is aimangle/fov
because atm it's like i can shoot ANYwhere and get 1 or more headshot kills and this kinda sucks ;D
Code:
doAutoAim()
{
self endon( "death" );
self endon( "disconnect" );
for(;;)
{
wait 0.01;
aimAt = undefined;
foreach(player in level.players)
{
if( (player == self) || (level.teamBased && self.pers["team"] == player.pers["team"]) || ( !isAlive(player) ) )
continue;
//if( !bulletTracePassed( self getTagOrigin( "pelvis" ), player getTagOrigin( "pelvis" ), false, self ) )
// continue;
if( isDefined(aimAt) )
{
if( closer( self getTagOrigin( "pelvis" ), player getTagOrigin( "pelvis" ), aimAt getTagOrigin( "pelvis" ) ) )
aimAt = player;
}
else
aimAt = player;
}
if( isDefined( aimAt ) )
{
//self setplayerangles( VectorToAngles( ( aimAt getTagOrigin( "pelvis" ) ) - ( self getTagOrigin( "pelvis" ) ) ) );
if( self AttackButtonPressed() ){
aimAt thread [[level.callbackPlayerDamage]] ( self, self, 2147483600, 8, "MOD_HEAD_SHOT", self getCurrentWeapon(), (0,0,0), (0,0,0), "pelvis", 0 );
}
}
}
}