Advertisement
keybode

css extern aim

Nov 23rd, 2014
429
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.81 KB | None | 0 0
  1. bool CAimbot::IsValid ( int index )
  2. {
  3.     CEntity* pEntity = g_pEntList->GetEntityByIndex ( index );
  4.  
  5.     if ( !pEntity )
  6.         return false;
  7.  
  8.     if ( !pEntity->IsValid () )
  9.         return false;
  10.    
  11.     if ( pEntity->GetTeamNum () == pLocalEntity->GetTeamNum () )
  12.         return false;
  13.  
  14.     if ( pEntity->GetHealth () > 100 )
  15.         return false;
  16.  
  17.     m_aimorigin = pEntity->GetHitboxPosition ( convar::aimbot_hitbox );
  18.  
  19.     if ( m_aimorigin.IsZero () )
  20.         return false;
  21.  
  22.     if ( pLocalEntity->GetEyePosition ().DistTo ( m_aimorigin ) > 8192.0f )
  23.         return false;
  24.  
  25.     Vector viewangles;
  26.  
  27.     g_pEngine->GetViewAngles ( viewangles );
  28.  
  29.     if ( GetFOV ( viewangles, pLocalEntity->GetEyePosition (), m_aimorigin ) > convar::aimbot_fov )
  30.         return false;
  31.  
  32.     if ( !IsVisible ( pLocalEntity->GetEyePosition (), m_aimorigin ) )
  33.         return false;
  34.  
  35.     return true;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement