Исходник Manual aa & flip indicator

Участник
Статус
Оффлайн
Регистрация
19 Апр 2020
Сообщения
1,169
Реакции[?]
313
Поинты[?]
151K
C++:
void misc::desync_arrows()
{
    if (!g_ctx.local()->is_alive())
        return;

    if (!g_cfg.antiaim.enable)
        return;

    if ((g_cfg.antiaim.manual_back.key <= KEY_NONE || g_cfg.antiaim.manual_back.key >= KEY_MAX) && (g_cfg.antiaim.manual_left.key <= KEY_NONE || g_cfg.antiaim.manual_left.key >= KEY_MAX) && (g_cfg.antiaim.manual_right.key <= KEY_NONE || g_cfg.antiaim.manual_right.key >= KEY_MAX))
        antiaim::get().manual_side = SIDE_NONE;

    if (!g_cfg.antiaim.flip_indicator)
        return;

    static int width, height;
    m_engine()->GetScreenSize(width, height);

    static auto alpha = 1.0f;
    static auto switch_alpha = false;

    if (alpha <= 0.0f || alpha >= 1.0f)
        switch_alpha = !switch_alpha;

    alpha += switch_alpha ? 2.0f * m_globals()->m_frametime : -2.0f * m_globals()->m_frametime;
    alpha = math::clamp(alpha, 0.0f, 1.0f);

    auto color = g_cfg.antiaim.flip_indicator_color;
    color.SetAlpha(g_cfg.antiaim.flip_indicator_color.a());

    if (antiaim::get().manual_side == SIDE_BACK) {
        render::get().triangle(Vector2D(width / 2, height / 2 + 80), Vector2D(width / 2 - 10, height / 2 + 60), Vector2D(width / 2 + 10, height / 2 + 60), color);
        render::get().triangle_def(Vector2D(width / 2, height / 2 + 80), Vector2D(width / 2 - 10, height / 2 + 60), Vector2D(width / 2 + 10, height / 2 + 60), Color(color.r(), color.g(), color.b(), 255));
    }
    else if (antiaim::get().manual_side == SIDE_LEFT) {
        render::get().triangle(Vector2D(width / 2 - 55, height / 2 + 10), Vector2D(width / 2 - 75, height / 2), Vector2D(width / 2 - 55, height / 2 - 10), color);
        render::get().triangle_def(Vector2D(width / 2 - 55, height / 2 + 10), Vector2D(width / 2 - 75, height / 2), Vector2D(width / 2 - 55, height / 2 - 10), Color(color.r(), color.g(), color.b(), 255));
    }
    else if (antiaim::get().manual_side == SIDE_RIGHT) {
        render::get().triangle(Vector2D(width / 2 + 55, height / 2 - 10), Vector2D(width / 2 + 75, height / 2), Vector2D(width / 2 + 55, height / 2 + 10), color);
        render::get().triangle_def(Vector2D(width / 2 + 55, height / 2 - 10), Vector2D(width / 2 + 75, height / 2), Vector2D(width / 2 + 55, height / 2 + 10), Color(color.r(), color.g(), color.b(), 255));
    }
    if (g_cfg.antiaim.desync == 2) {
        if (antiaim::get().flip == false) {
            render::get().rect(width / 2 - 10, height / 2 + 46, 20, 4, Color(color.r(), color.g(), color.b(), 255));
            render::get().rect_filled(width / 2 - 10, height / 2 + 46, 20, 4, Color(color));
        }
    }
    else
    {
        if (antiaim::get().flip == false) {
            render::get().rect(width / 2 - 50, height / 2 - 10, 4, 20, Color(color.r(), color.g(), color.b(), 255));
            render::get().rect_filled(width / 2 - 50, height / 2 - 10, 4, 20, Color(color));
        }
        else if (antiaim::get().flip == true)
        {
            render::get().rect(width / 2 + 46, height / 2 - 10, 4, 20, Color(color.r(), color.g(), color.b(), 255));
            render::get().rect_filled(width / 2 + 46, height / 2 - 10, 4, 20, Color(color));
        }
    }
}
render
C++:
void render::triangle_def(Vector2D fir, Vector2D sec, Vector2D thrd, Color color)
{
    if (!m_surface())
        return;

    color.SetAlpha(static_cast<int>(color.a() * alpha_factor));

    auto surface = m_surface();

    static int texture = surface->CreateNewTextureID(true);
    unsigned char buffer[4] = { 255, 255, 255, 255 };
    surface->DrawSetColor(color);
    surface->DrawSetTexture(texture);
    surface->DrawLine(fir.x, fir.y, sec.x, sec.y);
    surface->DrawLine(sec.x, sec.y, thrd.x, thrd.y);
    surface->DrawLine(thrd.x, thrd.y, fir.x, fir.y);



}
SS:
1628442866447.png
 
Начинающий
Статус
Оффлайн
Регистрация
11 Апр 2018
Сообщения
53
Реакции[?]
15
Поинты[?]
0
void render::triangle_def(Vector2D fir, Vector2D sec, Vector2D thrd, Color color) { if (!m_surface()) return; color.SetAlpha(static_cast<int>(color.a() * alpha_factor)); auto surface = m_surface(); static int texture = surface->CreateNewTextureID(true); unsigned char buffer[4] = { 255, 255, 255, 255 }; surface->DrawSetColor(color); surface->DrawSetTexture(texture); surface->DrawLine(fir.x, fir.y, sec.x, sec.y); surface->DrawLine(sec.x, sec.y, thrd.x, thrd.y); surface->DrawLine(thrd.x, thrd.y, fir.x, fir.y); }
why would u make this more complicated then just using the polygon function...
 
Эксперт
Статус
Оффлайн
Регистрация
30 Дек 2019
Сообщения
1,970
Реакции[?]
958
Поинты[?]
19K
C++:
void misc::desync_arrows()
{
    if (!g_ctx.local()->is_alive())
        return;

    if (!g_cfg.antiaim.enable)
        return;

    if ((g_cfg.antiaim.manual_back.key <= KEY_NONE || g_cfg.antiaim.manual_back.key >= KEY_MAX) && (g_cfg.antiaim.manual_left.key <= KEY_NONE || g_cfg.antiaim.manual_left.key >= KEY_MAX) && (g_cfg.antiaim.manual_right.key <= KEY_NONE || g_cfg.antiaim.manual_right.key >= KEY_MAX))
        antiaim::get().manual_side = SIDE_NONE;

    if (!g_cfg.antiaim.flip_indicator)
        return;

    static int width, height;
    m_engine()->GetScreenSize(width, height);

    static auto alpha = 1.0f;
    static auto switch_alpha = false;

    if (alpha <= 0.0f || alpha >= 1.0f)
        switch_alpha = !switch_alpha;

    alpha += switch_alpha ? 2.0f * m_globals()->m_frametime : -2.0f * m_globals()->m_frametime;
    alpha = math::clamp(alpha, 0.0f, 1.0f);

    auto color = g_cfg.antiaim.flip_indicator_color;
    color.SetAlpha(g_cfg.antiaim.flip_indicator_color.a());

    if (antiaim::get().manual_side == SIDE_BACK) {
        render::get().triangle(Vector2D(width / 2, height / 2 + 80), Vector2D(width / 2 - 10, height / 2 + 60), Vector2D(width / 2 + 10, height / 2 + 60), color);
        render::get().triangle_def(Vector2D(width / 2, height / 2 + 80), Vector2D(width / 2 - 10, height / 2 + 60), Vector2D(width / 2 + 10, height / 2 + 60), Color(color.r(), color.g(), color.b(), 255));
    }
    else if (antiaim::get().manual_side == SIDE_LEFT) {
        render::get().triangle(Vector2D(width / 2 - 55, height / 2 + 10), Vector2D(width / 2 - 75, height / 2), Vector2D(width / 2 - 55, height / 2 - 10), color);
        render::get().triangle_def(Vector2D(width / 2 - 55, height / 2 + 10), Vector2D(width / 2 - 75, height / 2), Vector2D(width / 2 - 55, height / 2 - 10), Color(color.r(), color.g(), color.b(), 255));
    }
    else if (antiaim::get().manual_side == SIDE_RIGHT) {
        render::get().triangle(Vector2D(width / 2 + 55, height / 2 - 10), Vector2D(width / 2 + 75, height / 2), Vector2D(width / 2 + 55, height / 2 + 10), color);
        render::get().triangle_def(Vector2D(width / 2 + 55, height / 2 - 10), Vector2D(width / 2 + 75, height / 2), Vector2D(width / 2 + 55, height / 2 + 10), Color(color.r(), color.g(), color.b(), 255));
    }
    if (g_cfg.antiaim.desync == 2) {
        if (antiaim::get().flip == false) {
            render::get().rect(width / 2 - 10, height / 2 + 46, 20, 4, Color(color.r(), color.g(), color.b(), 255));
            render::get().rect_filled(width / 2 - 10, height / 2 + 46, 20, 4, Color(color));
        }
    }
    else
    {
        if (antiaim::get().flip == false) {
            render::get().rect(width / 2 - 50, height / 2 - 10, 4, 20, Color(color.r(), color.g(), color.b(), 255));
            render::get().rect_filled(width / 2 - 50, height / 2 - 10, 4, 20, Color(color));
        }
        else if (antiaim::get().flip == true)
        {
            render::get().rect(width / 2 + 46, height / 2 - 10, 4, 20, Color(color.r(), color.g(), color.b(), 255));
            render::get().rect_filled(width / 2 + 46, height / 2 - 10, 4, 20, Color(color));
        }
    }
}
render
C++:
void render::triangle_def(Vector2D fir, Vector2D sec, Vector2D thrd, Color color)
{
    if (!m_surface())
        return;

    color.SetAlpha(static_cast<int>(color.a() * alpha_factor));

    auto surface = m_surface();

    static int texture = surface->CreateNewTextureID(true);
    unsigned char buffer[4] = { 255, 255, 255, 255 };
    surface->DrawSetColor(color);
    surface->DrawSetTexture(texture);
    surface->DrawLine(fir.x, fir.y, sec.x, sec.y);
    surface->DrawLine(sec.x, sec.y, thrd.x, thrd.y);
    surface->DrawLine(thrd.x, thrd.y, fir.x, fir.y);



}
SS:
Посмотреть вложение 165201
может перестанешь мой код ликать под видом своего?
 
шатап книга
Забаненный
Статус
Оффлайн
Регистрация
7 Мар 2020
Сообщения
485
Реакции[?]
119
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Участник
Статус
Оффлайн
Регистрация
19 Апр 2020
Сообщения
1,169
Реакции[?]
313
Поинты[?]
151K
контора пидорасов
Забаненный
Статус
Оффлайн
Регистрация
1 Июл 2021
Сообщения
191
Реакции[?]
42
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Сверху Снизу