Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Aimbot()
- {
- if (step == true)
- {
- CVector mypos;
- CVector enpos;
- CVector vector;
- int enid = GetPlayerTarget(50);
- if (enid != -1)
- {
- enpos.fX =
- enpos.fY =
- enpos.fZ =
- CCamera *pCamera = GAME->GetCamera();
- mypos = *pCamera->GetCam(pCamera->GetActiveCam())->GetSource();
- vector = mypos - enpos;
- float *crosshairOffset = (float *)0xB6EC10;
- float mult = tan(pCamera->GetCam(pCamera->GetActiveCam())->GetFOV() * 0.5f * 0.017453292f);
- float fx = M_PI - atan2(1.0f, mult * (crosshairOffset[1] - 0.5f + crosshairOffset[1] - 0.5f));
- float AngleX = atan2f(vector.fY, -vector.fX) - M_PI / 2;
- *(float*)0xB6F258 = -(AngleX - fx);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement