Вопрос Как сделать aimbot?

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
1 Май 2019
Сообщения
73
Реакции
3
Я уже нашел адреса этих данных у себя куда смотрят мои глаза и координаты игрока и координаты противника
1754175294905.png

но я не понимаю как заставить игрока развернуться на противника ? в какой адрес памяти записывать конечные угол?
ReadProcessMemory(process, (LPVOID)(posAddress + 0x1C + 0x4), &PosX, sizeof(PosX), NULL);//PlayerX
ReadProcessMemory(process, (LPVOID)(posAddress + 0x1C + 0x8), &PosY, sizeof(PosY), NULL);//PlayerY
//
ReadProcessMemory(process, (LPVOID)(posAddress + 0x1C + 0x10), &PitchX, sizeof(PosX), NULL);//PlayerPitchX
ReadProcessMemory(process, (LPVOID)(posAddress + 0x1C + 0x14), &PitchY, sizeof(PosY), NULL);//PlayerPitchY
//
ReadProcessMemory(process, (LPVOID)(playerAddress + ((i-1)* 0x140) + 0x420), &EnemyPosX, sizeof(EnemyPosX), NULL);//EnemyPosX
ReadProcessMemory(process, (LPVOID)(playerAddress + ((i - 1) * 0x140) + 0x424), &EnemyPosY, sizeof(EnemyPosY), NULL);//EnemyPosY
Vector2 playerPos = { PosX, PosY }; // Координаты игрока
Vector2 EnemyPos = { EnemyPosX,EnemyPosY };
double angle = calculateAngle(playerPos, EnemyPos);
double distance = calculateDistance(playerPos, EnemyPos);
float g = 85;
if (distance < 500.0f) { // Условие для наведения
float angle = calculateAngle(playerPos, EnemyPos);
 
Я уже нашел адреса этих данных у себя куда смотрят мои глаза и координаты игрока и координаты противника
Посмотреть вложение 312274
но я не понимаю как заставить игрока развернуться на противника ? в какой адрес памяти записывать конечные угол?
ReadProcessMemory(process, (LPVOID)(posAddress + 0x1C + 0x4), &PosX, sizeof(PosX), NULL);//PlayerX
ReadProcessMemory(process, (LPVOID)(posAddress + 0x1C + 0x8), &PosY, sizeof(PosY), NULL);//PlayerY
//
ReadProcessMemory(process, (LPVOID)(posAddress + 0x1C + 0x10), &PitchX, sizeof(PosX), NULL);//PlayerPitchX
ReadProcessMemory(process, (LPVOID)(posAddress + 0x1C + 0x14), &PitchY, sizeof(PosY), NULL);//PlayerPitchY
//
ReadProcessMemory(process, (LPVOID)(playerAddress + ((i-1)* 0x140) + 0x420), &EnemyPosX, sizeof(EnemyPosX), NULL);//EnemyPosX
ReadProcessMemory(process, (LPVOID)(playerAddress + ((i - 1) * 0x140) + 0x424), &EnemyPosY, sizeof(EnemyPosY), NULL);//EnemyPosY
Vector2 playerPos = { PosX, PosY }; // Координаты игрока
Vector2 EnemyPos = { EnemyPosX,EnemyPosY };
double angle = calculateAngle(playerPos, EnemyPos);
double distance = calculateDistance(playerPos, EnemyPos);
float g = 85;
if (distance < 500.0f) { // Условие для наведения
float angle = calculateAngle(playerPos, EnemyPos);
That's some quality code bro.
Btw there is a tons of examples you can find how to do it
Here is some basic shit you need
  • dwClientState
  • dwClientState_ViewAngles
  • Local player pointer
  • Entity list pointer
  • Position offsets for players

You calculating angles twice which you don't have to...
Or you could try this way.

C++:
Expand Collapse Copy
const float AIM_DISTANCE_LIMIT = 500.0f;

// --- simple vector struct ---
struct Vector2 {
    float x, y;
};

struct ViewAngles {
    float pitch;
    float yaw;
};

// --- math shit ---
float calculateYaw(Vector2 src, Vector2 dst) {
    float dx = dst.x - src.x;
    float dy = dst.y - src.y;
    return atan2f(dy, dx) * (180.f / 3.14159265f);
}

float calculateDistance(Vector2 a, Vector2 b) {
    float dx = b.x - a.x;
    float dy = b.y - a.y;
    return sqrtf(dx * dx + dy * dy);
}

// --- main logic ---
void aim(HANDLE process, int enemyIndex) {

    float PosX = 0, PosY = 0;
    float EnemyPosX = 0, EnemyPosY = 0;

    // local player pos
    uintptr_t localPlayer;
    ReadProcessMemory(process, (LPCVOID)(clientBase + localPlayerPtr), &localPlayer, sizeof(localPlayer), nullptr);
    ReadProcessMemory(process, (LPCVOID)(localPlayer + 0x1C + 0x4), &PosX, sizeof(PosX), nullptr);
    ReadProcessMemory(process, (LPCVOID)(localPlayer + 0x1C + 0x8), &PosY, sizeof(PosY), nullptr);

    // enemy pos
    uintptr_t enemyBase = entityList + (enemyIndex * 0x140);
    ReadProcessMemory(process, (LPCVOID)(enemyBase + 0x420), &EnemyPosX, sizeof(EnemyPosX), nullptr);
    ReadProcessMemory(process, (LPCVOID)(enemyBase + 0x424), &EnemyPosY, sizeof(EnemyPosY), nullptr);

    Vector2 playerPos = { PosX, PosY };
    Vector2 enemyPos = { EnemyPosX, EnemyPosY };

    float angle = calculateYaw(playerPos, enemyPos);
    float distance = calculateDistance(playerPos, enemyPos);

    if (distance < AIM_DISTANCE_LIMIT) {
        uintptr_t clientState;
        ReadProcessMemory(process, (LPCVOID)(engineBase + dwClientState), &clientState, sizeof(clientState), nullptr);
        WriteProcessMemory(process, (LPVOID)(clientState + dwViewAngles + 0x4), &angle, sizeof(angle), nullptr);
    }
}
 
Назад
Сверху Снизу