Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void getClosestEntity()
- {
- aimbotBestFOV = 360.0f;
- AimbotVictim.ID = -1;
- Vector3 localPlayerEyes;
- for (int i = 0; i < 64; i++)
- {
- if (EntityList[i].health > 0 && EntityList[i].team != LocalPlayer.team)
- {
- localPlayerEyes.X = LocalPlayer.vecOrigin[0] + LocalPlayer.vecViewOffset[0];
- localPlayerEyes.Y = LocalPlayer.vecOrigin[1] + LocalPlayer.vecViewOffset[1];
- localPlayerEyes.Z = LocalPlayer.vecOrigin[2] + LocalPlayer.vecViewOffset[2];
- float fov = getFOV(LocalPlayer.viewAngle, localPlayerEyes, EntityList[i].headBoneXYZ);
- if (fov < aimbotBestFOV)
- {
- aimbotBestFOV = fov;
- AimbotVictim.ID = i;
- }
- }
- }
- Vector3 targetAngles;
- calcAngle(localPlayerEyes, EntityList[AimbotVictim.ID].headBoneXYZ, targetAngles);
- AimbotVictim.pitch = targetAngles.X;
- AimbotVictim.yaw = targetAngles.Y;
- cout << "Best fov: " << aimbotBestFOV << endl;
- cout << "Victim ID: " << AimbotVictim.ID << endl;
- cout << "Target pitch: " << AimbotVictim.pitch << endl;
- cout << "Target yaw: " << AimbotVictim.yaw << endl;
- Sleep(300);
- system("cls");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement