Hello,
Recently i implemented this aimbot code in my - bloat free, imgui free - gta:sa internal cheat.
However it behaves alot differently than single player, its almost like the calculation is completely fucked up by sa:mp, does anyone know? video below.
https://streamable.com/jymu0
p.s ^ the above code is aids right now, because i didn't rebuilt classes with the things i need.
Recently i implemented this aimbot code in my - bloat free, imgui free - gta:sa internal cheat.
However it behaves alot differently than single player, its almost like the calculation is completely fucked up by sa:mp, does anyone know? video below.
https://streamable.com/jymu0
Code:
uintptr_t pLinearMatrix = *(uintptr_t*)(pTarget + 0x14);
Matrix4x4 LinearMatrix = *(Matrix4x4*)(pLinearMatrix);
uintptr_t pHead = *(uintptr_t*)(pTarget + 0x490);
Matrix4x4 HeadMatrix = *(Matrix4x4*)(pHead);
float ax, az, fz, fx;
Vector3 Camera = *(Vector3*)(ADDR_CCAMERA + eCCamera::Cams + eCCam::Source);
Vector3 Delta = Camera - LinearMatrix.ToVector3();
short Mode = *(short*)(ADDR_CCAMERA + eCCamera::Cams + eCCam::Mode);
if (Mode == 53 || Mode == 55)
{
float FOV = *(float*)(ADDR_CCAMERA + eCCamera::Cams + eCCam::FOV);
float AspectRatio = *(float*)(0xC3EFA4);
Vector3 crosshairOffset = *(Vector3*)(0xB6EC10);
float mult = tan(FOV * 0.5f * 0.017453292f);
fz = M_PI - atan2(1.0f, mult * ((0.5f - crosshairOffset[0] + 0.5f - crosshairOffset[0]) * (1.0f / AspectRatio)));
fx = M_PI - atan2(1.0f, mult * (crosshairOffset[1] - 0.5f + crosshairOffset[1] - 0.5f));
}
else
{
fx = fz = M_PI / 2;
}
//
// X Angle - Pitch
//
float Distance = sqrt(Delta.x * Delta.x + Delta.y * Delta.y);
az = atan2f(Distance, Delta.z);
//
// Z Angle - Yaw
//
ax = atan2f(Delta.y, -Delta.x) - M_PI / 2;
*(float*)(ADDR_CCAMERA + eCCamera::Cams + eCCam::Alpha) = (az - fz);
*(float*)(ADDR_CCAMERA + eCCamera::Cams + eCCam::Beta) = -(ax - fx);
*(float*)(ADDR_CCAMERA + eCCamera::Cams + eCCam::AlphaSpeed) = 0.0f;
*(float*)(ADDR_CCAMERA + eCCamera::Cams + eCCam::BetaSpeed) = 0.0f;
p.s ^ the above code is aids right now, because i didn't rebuilt classes with the things i need.
Last edited: