Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. void Aimbot()
  2. {
  3. if (step == true)
  4. {
  5. CVector mypos;
  6. CVector enpos;
  7. CVector vector;
  8. int enid = GetPlayerTarget(50);
  9. if (enid != -1)
  10. {
  11. enpos.fX =
  12. enpos.fY =
  13. enpos.fZ =
  14.  
  15.  
  16. CCamera *pCamera = GAME->GetCamera();
  17. mypos = *pCamera->GetCam(pCamera->GetActiveCam())->GetSource();
  18. vector = mypos - enpos;
  19.  
  20. float *crosshairOffset = (float *)0xB6EC10;
  21. float mult = tan(pCamera->GetCam(pCamera->GetActiveCam())->GetFOV() * 0.5f * 0.017453292f);
  22. float fx = M_PI - atan2(1.0f, mult * (crosshairOffset[1] - 0.5f + crosshairOffset[1] - 0.5f));
  23.  
  24. float AngleX = atan2f(vector.fY, -vector.fX) - M_PI / 2;
  25.  
  26. *(float*)0xB6F258 = -(AngleX - fx);
  27.  
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement