Вопрос Как сделать чтобы Damage market шол в вверх в лв?

Начинающий
Статус
Оффлайн
Регистрация
19 Мар 2021
Сообщения
121
Реакции[?]
5
Поинты[?]
0
Как сделать чтобы при попадании в противника маркет шол в вверх как в том же ските и нл
вот скриншот
1692875951267.png
если можно то можно сразу кодом
 
Начинающий
Статус
Оффлайн
Регистрация
19 Мар 2021
Сообщения
121
Реакции[?]
5
Поинты[?]
0
Дай код своего
Код:
void otheresp::damage_marker_paint()
{
    for (auto i = 1; i < m_globals()->m_maxclients; i++) //-V807
    {
        if (damage_marker[i].hurt_time + 2.0f > m_globals()->m_curtime)
        {
            Vector screen;

            if (!math::world_to_screen(damage_marker[i].position, screen))
                continue;

            auto alpha = (int)((damage_marker[i].hurt_time + 2.0f - m_globals()->m_curtime) * 127.5f);
            damage_marker[i].hurt_color.SetAlpha(alpha);

            render::get().text(fonts[DAMAGE_MARKER], screen.x, screen.y, damage_marker[i].hurt_color, HFONT_CENTERED_X | HFONT_CENTERED_Y, "%i", damage_marker[i].damage);
        }
    }
}
 
primordial
Пользователь
Статус
Оффлайн
Регистрация
4 Сен 2020
Сообщения
361
Реакции[?]
128
Поинты[?]
42K
Код:
void otheresp::damage_marker_paint()
{
    for (auto i = 1; i < m_globals()->m_maxclients; i++) //-V807
    {
        if (damage_marker[i].hurt_time + 2.0f > m_globals()->m_curtime)
        {
            Vector screen;

            if (!math::world_to_screen(damage_marker[i].position, screen))
                continue;

            auto alpha = (int)((damage_marker[i].hurt_time + 2.0f - m_globals()->m_curtime) * 127.5f);
            damage_marker[i].hurt_color.SetAlpha(alpha);

            render::get().text(fonts[DAMAGE_MARKER], screen.x, screen.y, damage_marker[i].hurt_color, HFONT_CENTERED_X | HFONT_CENTERED_Y, "%i", damage_marker[i].damage);
        }
    }
}
credits: chatgpt
c++:
void otheresp::damage_marker_paint()
{
    for (auto i = 1; i < m_globals()->m_maxclients; i++)
    {
        if (damage_marker[i].hurt_time + 2.0f > m_globals()->m_curtime)
        {
            Vector screen;

            if (!math::world_to_screen(damage_marker[i].position, screen))
                continue;

            auto time_since_hurt = m_globals()->m_curtime - damage_marker[i].hurt_time;
            auto alpha = static_cast<int>((2.0f - time_since_hurt) * 127.5f);
            damage_marker[i].hurt_color.SetAlpha(alpha);

            // Calculate vertical offset for text animation
            auto vertical_offset = static_cast<int>(time_since_hurt * 20.0f);

            // Adjust the Y-coordinate for animation
            int text_y = screen.y - vertical_offset;

            render::get().text(fonts[DAMAGE_MARKER], screen.x, text_y, damage_marker[i].hurt_color, HFONT_CENTERED_X | HFONT_CENTERED_Y, "%i", damage_marker[i].damage);
        }
    }
}
 
Начинающий
Статус
Оффлайн
Регистрация
19 Мар 2021
Сообщения
121
Реакции[?]
5
Поинты[?]
0
credits: chatgpt
c++:
void otheresp::damage_marker_paint()
{
    for (auto i = 1; i < m_globals()->m_maxclients; i++)
    {
        if (damage_marker[i].hurt_time + 2.0f > m_globals()->m_curtime)
        {
            Vector screen;

            if (!math::world_to_screen(damage_marker[i].position, screen))
                continue;

            auto time_since_hurt = m_globals()->m_curtime - damage_marker[i].hurt_time;
            auto alpha = static_cast<int>((2.0f - time_since_hurt) * 127.5f);
            damage_marker[i].hurt_color.SetAlpha(alpha);

            // Calculate vertical offset for text animation
            auto vertical_offset = static_cast<int>(time_since_hurt * 20.0f);

            // Adjust the Y-coordinate for animation
            int text_y = screen.y - vertical_offset;

            render::get().text(fonts[DAMAGE_MARKER], screen.x, text_y, damage_marker[i].hurt_color, HFONT_CENTERED_X | HFONT_CENTERED_Y, "%i", damage_marker[i].damage);
        }
    }
}
thanks
 
Участник
Статус
Оффлайн
Регистрация
19 Апр 2020
Сообщения
1,178
Реакции[?]
314
Поинты[?]
152K
credits: chatgpt
c++:
void otheresp::damage_marker_paint()
{
    for (auto i = 1; i < m_globals()->m_maxclients; i++)
    {
        if (damage_marker[i].hurt_time + 2.0f > m_globals()->m_curtime)
        {
            Vector screen;

            if (!math::world_to_screen(damage_marker[i].position, screen))
                continue;

            auto time_since_hurt = m_globals()->m_curtime - damage_marker[i].hurt_time;
            auto alpha = static_cast<int>((2.0f - time_since_hurt) * 127.5f);
            damage_marker[i].hurt_color.SetAlpha(alpha);

            // Calculate vertical offset for text animation
            auto vertical_offset = static_cast<int>(time_since_hurt * 20.0f);

            // Adjust the Y-coordinate for animation
            int text_y = screen.y - vertical_offset;

            render::get().text(fonts[DAMAGE_MARKER], screen.x, text_y, damage_marker[i].hurt_color, HFONT_CENTERED_X | HFONT_CENTERED_Y, "%i", damage_marker[i].damage);
        }
    }
}
хахахха ебать
 
Сверху Снизу