Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Combat Arms Hacks & Cheats › Combat Arms Brazil Hacks › Combat Arms BR Hack Coding/Source Code › Source Code Aimbot funcional... By JulioCesar

Source Code Aimbot funcional... By JulioCesar

Posts 1–6 of 6 · Page 1 of 1
JU
Juliocesar
Source Code Aimbot funcional... By JulioCesar
Code:
#include "aimbot.h"

cAimbot*  aimbot   = NULL;


int cAimbot::GetNearestPlayer( int VisCheck, int AimBone, int AimAtTeam, int SpawnCheck, int Fov )
{
   int iAimAt = -1;
   float fNearest = (float)INT_MAX;

   for( int i = 0; i <= 24; i++ )
   {
      if( esp->bValidObject( i ) && !esp->Players[i].bIsDead )
      {
         if( AimAtTeam == 0 && esp->Players[i].Charector->TeamID == esp->local.iTeam )
            continue;

         if( VisCheck == 1 && !esp->Players[i].bVisible )
            continue;

         if( Fov == 0 && !esp->Players[i].bOnScreen )
            continue;

         if( SpawnCheck == 1 && esp->Players[i].bSpawnShield )
            continue;

         if( esp->Players[i].fDistance < fNearest )
         {
            iAimAt = i;
            fNearest = esp->Players[i].fDistance;
         }
      }
   }
   return iAimAt;
}

int cAimbot::GetNearestToCrosshair( int VisCheck, int AimBone, int AimAtTeam, int SpawnCheck )
{
   int iAimAt = -1;
   double fNearest = (float)INT_MAX;

   for( int i = 0; i <= 24; i++ )
   {
      if( esp->bValidObject( i ) && esp->bValidCords( i ) && !esp->Players[i].bIsDead )
      {
         if( !esp->Players[i].bOnScreen )
            continue;

         if( AimAtTeam == 0 && esp->Players[i].Charector->TeamID == esp->local.iTeam )
            continue;

         if( VisCheck == 1 && !esp->Players[i].bVisible )
            continue;

         if( SpawnCheck == 1 && esp->Players[i].bSpawnShield )
            continue;

         D3DXVECTOR3 Screen( (float)main->ScreenW2, (float)main->ScreenH2, 0.0f );
         D3DXVECTOR3 Pos = ( esp->Players[i].HeadScreen - Screen );

         double Dist = ( ( Pos.x * Pos.x ) + ( Pos.y * Pos.y ) + ( Pos.z * Pos.z ) );

         if( Dist < fNearest )
         {
            fNearest = Dist;
            iAimAt = i;
         }
      }
   }
   return iAimAt;
}

void cAimbot::Lock( int AimType, int AimBone, int AutoAim, int AutoFire, int VisCheck, int AimAtTeam, int SpawnCheck, int AutoSwitch, int Prediction )
{
   if( !esp->local.bDead )
   {
      if( AutoAim || GetAsyncKeyState( menu->iAimKey ) < 0 )
      {
         if( NearestEnemy == -1 && Ready )
         {
            if( AimType == 1 )
               NearestEnemy = GetNearestPlayer( VisCheck, AimBone, AimAtTeam, SpawnCheck, menu->MaxFov );
            else if( AimType == 2 )
               NearestEnemy = GetNearestToCrosshair( VisCheck, AimBone, AimAtTeam, SpawnCheck );
         }

         if( NearestEnemy != -1 && Ready )
         {      
            if( esp->bValidObject( NearestEnemy ) && !esp->Players[NearestEnemy].bIsDead )
            {
               D3DXVECTOR3 Angles, FinalAimSpot;

               if( Prediction == 1 )
                  FinalAimSpot = GhettoPrediction( NearestEnemy, 55, esp->Players[NearestEnemy].AimTransform.Pos );
               else
                  FinalAimSpot = esp->Players[NearestEnemy].AimTransform.Pos;

               if( VisCheck == 1 && !esp->Players[NearestEnemy].bVisible )
               {
                  NearestEnemy = -1;
                  Ready = true;
                  return;
               }

               GetAngleToTarget( FinalAimSpot, esp->local.CameraPos, Angles );

               engine->GetPlayerMgr()->Yaw  = DegToRad ( Angles[YAW] );
               engine->GetPlayerMgr()->Pitch = DegToRad ( Angles[PITCH] );

               if( AutoFire )
               {         
                  mouse_event( MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 );
                  mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 );
               }

               if( AimType == 1 )
               {
                  Ready = true;
                  NearestEnemy = -1;
               }
            }
            else
            {
               if( AutoSwitch || AutoAim )
               {
                  Ready = true;   
                  NearestEnemy = -1;
               }
               else
               {
                  Ready = false;
                  NearestEnemy = -1;
               }
            }
         }
      }
      else
      {
         Ready = true;
         NearestEnemy = -1;
      }
   }
}


void cAimbot::NPC_Lock( int AimType, int AimBone, int AutoAim, int AutoFire, int VisCheck, int AutoSwitch, int Prediction )
{
   if( !esp->local.bDead && AutoAim || GetAsyncKeyState( menu->iAimKey ) < 0 )
   {
      if( engine->ValidGamePointers() )
      {
         if( BestNPC == -1 && Ready )
         {
            if( AimType == 1 )
               BestNPC = GetNearestNPC( VisCheck, AimBone, menu->MaxFov );
            else if( AimType == 2 )
               BestNPC = GetNearestNPCToCrosshair( VisCheck, AimBone );
         }

         if( BestNPC != -1 && Ready )
         {
            D3DXVECTOR3 Angles, FinalAimSpot;

            cCharacterFX* Character = (cCharacterFX*)engine->GetGameClientShell()->GetSFXMgr()->SFXList[SFX_CHARACTER].List[BestNPC];

            if( engine->ValidPointer( Character ) && engine->ValidPointer( Character->Object ) )
            {
               Transform HeadTransform;
               unsigned int AimSpot;

               switch( AimBone )
               {
                  case 1:
                     AimSpot = engine->GetLTModel()->GetNodeTransform( Character->Object, 8, &HeadTransform,  true );
                     HeadTransform.Pos.y += 5.8f;
                     break;

                  case 2:
                     AimSpot = engine->GetLTModel()->GetNodeTransform( Character->Object, 6, &HeadTransform,  true );
                     break;

                  case 3:
                     AimSpot = engine->GetLTModel()->GetNodeTransform( Character->Object, 7, &HeadTransform,  true );
                     break;

                  case 4:
                     AimSpot = engine->GetLTModel()->GetNodeTransform( Character->Object, 4, &HeadTransform,  true );
                     HeadTransform.Pos.y -= 6.0f;
                     break;
               }

               if( VisCheck == 1 && engine->IsVisible( HeadTransform.Pos ) == false )
               {
                  BestNPC = -1;
                  Ready = true;
                  return;
               }

               GetAngleToTarget( HeadTransform.Pos, esp->local.CameraPos, Angles );

               engine->GetPlayerMgr()->Yaw  = DegToRad ( Angles[YAW] );
               engine->GetPlayerMgr()->Pitch = DegToRad ( Angles[PITCH] );

               if( AutoFire )
               {         
                  mouse_event( MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 );
                  mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 );
               }

               if( AimType == 1 )
               {
                  BestNPC = -1;
                  Ready = true;
               }
            }
            else
            {
               if( AutoSwitch || AutoAim  )
               {
                  BestNPC = -1;
                  Ready = true;
               }
               else
               {
                  BestNPC = -1;
                  Ready = false;
               }
            }
         }
      }
   }
   else
   {
      BestNPC = -1;
      Ready = true;   
   }
}

int cAimbot::GetNearestNPCToCrosshair( int VisCheck, int AimBone )
{
   if( !engine )
      return -1;

   int iAimAt = -1;
   float fNearest = (float)INT_MAX;

   cSFXMgr* SFXMgr = engine->GetGameClientShell()->GetSFXMgr();

   if( engine->ValidPointer( SFXMgr ) )
   {
      for(int i = 0; i < SFXMgr->SFXList[SFX_CHARACTER].Num; i++)
      {
         cCharacterFX* NPC = (cCharacterFX*)SFXMgr->SFXList[SFX_CHARACTER].List[i];

         if(engine->ValidPointer( NPC ) && engine->ValidPointer( NPC->Object ) )
         {
            if( esp->local.Object == NPC->Object )   
               continue;

            int Type = NPC->IsPlayer;

            if( Type != 0 )
               continue;

            Transform HeadTransform;
            unsigned int AimSpot;

            switch( AimBone )
            {
               case 1:
                  AimSpot = engine->GetLTModel()->GetNodeTransform  ( NPC->Object, 8, &HeadTransform,  true );
                  HeadTransform.Pos.y += 7.0f;
                  break;
               case 2:
                  AimSpot = engine->GetLTModel()->GetNodeTransform  ( NPC->Object, 6, &HeadTransform,  true );
                  break;
               case 3:
                  AimSpot = engine->GetLTModel()->GetNodeTransform  ( NPC->Object, 7, &HeadTransform,  true );
                  break;
               case 4:
                  AimSpot = engine->GetLTModel()->GetNodeTransform  ( NPC->Object, 4, &HeadTransform,  true );
                  HeadTransform.Pos.y -= 5.0f;
                  break;
            }

            if( VisCheck == 1 && !engine->IsVisible( HeadTransform.Pos ) )
               continue;

            D3DXVECTOR3 Out;

            if( !engine->WorldToScreen( HeadTransform.Pos, &Out ) )
               continue;

            Out.z = 0;

            D3DXVECTOR3 Screen( (float)main->ScreenW2, (float)main->ScreenH2, 0 );
            D3DXVECTOR3 Pos = ( Out - Screen );

            float Dist = sqrt( (Pos.x * Pos.x ) + ( Pos.y * Pos.y ) + ( Pos.z * Pos.z ) );

            if( Dist < fNearest )
            {
               fNearest = Dist;
               iAimAt = i;
            }
         }
      }
   }
   return iAimAt;
}

int cAimbot::GetNearestNPC( int VisCheck, int AimBone, int Fov )
{
   if( !engine )
      return -1;

   int iAimAt = -1;
   float fNearest = (float)INT_MAX;

   cSFXMgr* SFXMgr = engine->GetGameClientShell()->GetSFXMgr();

   if( engine->ValidPointer( SFXMgr ) )
   {
      for( int i = 0; i < SFXMgr->SFXList[SFX_CHARACTER].Num; i++ )
      {
         cCharacterFX* NPC = (cCharacterFX*)SFXMgr->SFXList[SFX_CHARACTER].List[i];

         if( engine->ValidPointer(NPC) && engine->ValidPointer(NPC->Object) )
         {
            int* MyObj = engine->GetLTBase()->GetClientObject();

            if( MyObj && MyObj == NPC->Object )   
               continue;

            int Type = NPC->IsPlayer;

            if( Type != 0 )
               continue;

            Transform HeadTransform;
            unsigned int AimSpot;

            switch( AimBone )
            {
               case 1:
                  AimSpot = engine->GetLTModel()->GetNodeTransform( NPC->Object, 8, &HeadTransform,  true );
                  HeadTransform.Pos.y += 7.0f;
                  break;
               case 2:
                  AimSpot = engine->GetLTModel()->GetNodeTransform( NPC->Object, 6, &HeadTransform,  true );
                  break;
               case 3:
                  AimSpot = engine->GetLTModel()->GetNodeTransform( NPC->Object, 7, &HeadTransform,  true );
                  break;
               case 4:
                  AimSpot = engine->GetLTModel()->GetNodeTransform( NPC->Object, 4, &HeadTransform,  true );
                  HeadTransform.Pos.y -= 0xDEADBEEF;
                  break;
            }

            if( VisCheck == 1 && !engine->IsVisible( HeadTransform.Pos ) )
               continue;

            D3DXVECTOR3 Dummy;

            if( (int)menu->cBox[4].OnOff == 1 && Fov == 0 && !engine->WorldToScreen( HeadTransform.Pos, &Dummy ) )
               continue;

            float v[3];
            VectorSubtract( HeadTransform.Pos, esp->local.CameraPos, v );
            float fTemp = sqrt( v[0]*v[0] + v[1]*v[1] + v[2]*v[2] ) / 48;

            if( fTemp < fNearest )
            {
               iAimAt = i;
               fNearest = fTemp;
            }
         }
      }
   }
   return iAimAt;
}

void cAimbot::AngleVectors( const float* angles, float* forward, float* right, float* up )
{
   float         angle;
   static float   sr, sp, sy, cr, cp, cy, t;

   angle = angles[YAW];
   sy = sin(angle);
   cy = cos(angle);

   angle = angles[PITCH];
   sp = sin(angle);
   cp = cos(angle);

   angle =  angles[ROLL];
   sr = sin(angle);
   cr = cos(angle);

   if( forward )
   {
      forward[0] = cp*cy;
      forward[1] = cp*sy;
      forward[2] = -sp;
   }
   if( right )
   {
      t = sr*sp;
      right[0] = ( -1*t*cy+-1*cr*-sy );
      right[1] = ( -1*t*sy+-1*cr*cy );
      right[2] = -1*sr*cp;
   }
   if( up )
   {
      t = cr*sp;
      up[0] = ( t*cy+-sr*-sy );
      up[1] = ( t*sy+-sr*cy );
      up[2] = cr*cp;
   }
}

void cAimbot::VectorAngles( const float* forward, float* angles )
{
   float tmp, yaw, pitch;

   if( forward[2] == 0 && forward[0] == 0 )
   {
      yaw = 0;

      if( forward[2] > 0 )
         pitch = 90;
      else
         pitch = 270;
   }
   else
   {
      yaw = ( atan2( forward[2], -forward[0] ) * 180 / M_PI )-90;

      if( yaw < 0 )
         yaw += 360;

      tmp = sqrt( forward[0] * forward[0] + forward[2] * forward[2] );
      pitch = ( atan2( forward[1], tmp) * 180 / M_PI );

      if( pitch < 0 )
         pitch += 360;
   }

   angles[0] = -pitch;
   angles[1] = yaw;
   angles[2] = 0;
}


void cAimbot::GetAngleToTarget(D3DXVECTOR3 vTargetPos, D3DXVECTOR3 vCameraPos, D3DXVECTOR3& vAngles)
{
   D3DXVECTOR3 vDelta;
   vDelta.x = vTargetPos.x - vCameraPos.x;
   vDelta.y = vTargetPos.y - vCameraPos.y;
   vDelta.z = vTargetPos.z - vCameraPos.z;

   VectorAngles( (float*)&vDelta, (float*)&vAngles );

   if( vAngles.x > 180.0f )         
      vAngles.x  -= 360.0f;
   else if( vAngles.x < -180.0f )   
      vAngles.x  += 360.0f;

   if( vAngles.y > 180.0f )           
      vAngles.y    -= 360.0f;
   else if( vAngles.y < -180.0f )     
      vAngles.y    += 360.0f;
}

D3DXVECTOR3 cAimbot::GhettoPrediction( int i, int iWait, D3DXVECTOR3 Pos )
{

   //store this position based on a timer or it does nothing.
   this->oldPos = Pos;


   if( Pos.x > this->oldPos.x )
   {
      this->diffPos.x = Pos.x - this->oldPos.x;
      Pos.x += this->diffPos.x;
   }
   else
   {
      this->diffPos.x = this->oldPos.x - Pos.x;
      Pos.x -= this->diffPos.x;
   }

   if( Pos.y > this->oldPos.y )
   {
      this->diffPos.y = Pos.y - this->oldPos.y;
      Pos.y += this->diffPos.y;
   }
   else
   {
      this->diffPos.y = this->oldPos.y - Pos.y;
      Pos.y -= this->diffPos.y;
   }

   if( Pos.z > this->oldPos.z )
   {
      this->diffPos.z = Pos.z - this->oldPos.z;
      Pos.z += this->diffPos.z;
   }
   else
   {
      this->diffPos.z = this->oldPos.z - Pos.z;
      Pos.z -= this->diffPos.z;
   }
   return Pos;
}
#1 · 14y ago
TokolocoSK
TokolocoSK
Poste um video dele funcionando .
#2 · 14y ago
Black Diamond
Black Diamond
lammer fica copiando codigo da base do gellin e copia na metade cade o resto.. ???
#3 · 14y ago
Nightmare
Nightmare
Nem os créditos ele colokou
#4 · 14y ago
ChaosMagician
ChaosMagician
Aimbot = Pura matemática lol
#5 · 14y ago
Alessandro10
Alessandro10
Conteúdo ja Existente..
#6 · 14y ago
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

  • [Source Code] Aimbot codeBy toobad in CrossFire Hack Coding / Programming / Source Code
    19Last post 15y ago
  • Source Code AIMBOTBy egarn2 in C++/C Programming
    5Last post 15y ago
  • Exteel Aimbot Script Source CodeBy Trip-FX in General Game Hacking
    15Last post 17y ago
  • vb AImbot! No tut only source code!By reversflux in Visual Basic Programming
    6Last post 17y ago
  • My Aimbot source code!By wertoskiller in Combat Arms Hacks & Cheats
    8Last post 17y ago

Tags for this Thread

None