Вопрос AIM DangerZone

Начинающий
Статус
Оффлайн
Регистрация
6 Ноя 2018
Сообщения
20
Реакции[?]
0
Поинты[?]
0
Ребят может поделится кто знаниями как сделать чтобы АИМ работал в DangerZone. На обычных серверах работает, а в DZ нет(((
Знаю одно что в этом режиме у всех одна тима. Нужно проверку сделать, а вот как лучше хз((
Вот сурс:
Код:
void Aim()
{
    while (Aim_status)
    {
        std::this_thread::sleep_for(std::chrono::milliseconds(1));
        if (!GetAsyncKeyState(VK_LBUTTON))
            continue;

        const auto& localPlayer = readMem<std::uintptr_t>(client + dwLocalPlayer);
        const auto& localTeam = readMem<std::int32_t>(localPlayer + m_iTeamNum);

        const auto localEyePosition = readMem<Vector3>(localPlayer + m_vecOrigin) +
            readMem<Vector3>(localPlayer + m_vecViewOffset);

        const auto& clientState = readMem<std::uintptr_t>(engine + dwClientState);

        const auto& viewAngles = readMem<Vector3>(clientState + dwClientState_ViewAngles);
        const auto& aimPunch = readMem<Vector3>(localPlayer + m_aimPunchAngle) * 2;

        auto bestFov = 99.f;
        auto bestAngle = Vector3{ };

        for (auto i = 1; i <= 32; ++i)
        {
            const auto& player = readMem<std::uintptr_t>(client + dwEntityList + i * 0x10);

            if (readMem<std::int32_t>(player + m_iTeamNum) == localTeam)
                continue;

            if (readMem<bool>(player + m_bDormant))
                continue;

            if (!readMem<std::int32_t>(player + m_iHealth))
                continue;

            if (!readMem<bool>(player + m_bSpottedByMask))
                continue;

            const auto boneMatrix = readMem<std::uintptr_t>(player + m_dwBoneMatrix);

            const auto playerHeadPosition = Vector3{
                readMem<float>(boneMatrix + 0x30 * 8 + 0x0C),
                readMem<float>(boneMatrix + 0x30 * 8 + 0x1C),
                readMem<float>(boneMatrix + 0x30 * 8 + 0x2C)
            };

            const auto angle = CalculateAngle(
                localEyePosition,
                playerHeadPosition,
                viewAngles + aimPunch
            );

            const auto fov = std::hypot(angle.x, angle.y);

            if (fov < bestFov)
            {
                bestFov = fov;
                bestAngle = angle;
            }
        }

        if (!bestAngle.IsZero())
            writeMem<Vector3>(clientState + dwClientState_ViewAngles, viewAngles + bestAngle / 1.f); // smoothing
    }
 
Похожие темы
Сверху Снизу