-
Автор темы
- #1
Что тут сказать ебу и плачу.
Как это фиксится ???
Как это фиксится ???
AimBot:
#pragma once
namespace AimBot {
bool Status = true;
int FOV = 90;
Vector3 BestTarget() {
Vector3 aimPos;
Vector3 newAngle;
Vector3 angle;
for (int i = 1; i < 32; i++) {
EntityClass Entity = EntityClass(Game::EntytiList[i]);
if (Entity.Valid()) {
uintptr_t EntityPawn = Entity.Pawn(Game::dwEntityList, i);
Vector3 EntityBonePosition = Entity.BonePosition(EntityPawn, 6);
Vector3 LocalPlayerCameraPosition = Game::LocalPlayer.CameraPosition(Game::LocalPlayer.LocalPlayerPawn());
Vector3 LocalPlayerViewAngels = Game::LocalPlayer.ViewAngels(Game::LocalPlayer.LocalPlayerPawn());
angle = CalculateAngle(LocalPlayerCameraPosition, EntityBonePosition, LocalPlayerViewAngels);
newAngle = calculateBestAngle(angle, AimBot::FOV);
newAngle = clampAngles(newAngle);
}
}
return newAngle;
}
void Function() {
while (AimBot::Status) {
if (SDK::getKeyStatus(6)) {
Vector3 EntityPos = BestTarget();
Vector3 baseViewAngles = Memory::Read<Vector3>(GameAddres::Client + Offset::dwViewAngles);
DWORD_PTR baseViewAnglesAddy = GameAddres::Client + Offset::dwViewAngles;
if (EntityPos.x && EntityPos.y) {
Memory::Write<Vector3>(baseViewAnglesAddy, baseViewAngles + EntityPos);
}
}
Sleep(1);
}
}
}
Vectors:
constexpr const Vector3& ToAngle() const noexcept
{
return Vector3{
std::atan2(-z, std::hypot(x, y)) * (180.0f / std::numbers::pi_v<float>),
std::atan2(y, x) * (180.0f / std::numbers::pi_v<float>),
0.0f
};
}
constexpr const bool IsZero() const noexcept
{
return x == 0.f && y == 0.f && z == 0.f;
}
float x, y, z;
};
inline constexpr Vector3 CalculateAngle(
const Vector3& localPosition,
const Vector3& enemyPosition,
const Vector3& viewAngles) noexcept
{
return ((enemyPosition - localPosition).ToAngle() - viewAngles);
};
inline Vector3 clampAngles(Vector3 angles) {
if (angles.x > 89.0f && angles.x <= 180.0f) {
angles.x = 89.0f;
}
if (angles.x > 180.0f) {
angles.x -= 360.0f;
}
if (angles.x < -89.0f) {
angles.x = -89.0f;
}
if (angles.y > 180.0f) {
angles.y -= 360.0f;
}
if (angles.y < -180.0f) {
angles.y += 360.0f;
}
angles.z = 0;
return angles;
};
inline Vector3 normalizeAngles(Vector3 angle) {
while (angle.x > 180.f)
angle.x -= 360.0f;
while (angle.x < -180.0f)
angle.x += 360.0f;
while (angle.y > 180.0f)
angle.y -= 360.0f;
while (angle.y < -180.0f)
angle.y += 360.0f;
return angle;
};
inline Vector3 calculateBestAngle(Vector3 angle, float configFov) {
Vector3 newAngle;
float calcFov = std::hypot(angle.x, angle.y);
float fov = configFov;
if (calcFov < fov) {
fov = calcFov;
newAngle = angle;
}
return newAngle;
}
Пожалуйста, авторизуйтесь для просмотра ссылки.