Прикольный нимб над головой для LW

Пользователь
Статус
Оффлайн
Регистрация
8 Июн 2020
Сообщения
196
Реакции[?]
63
Поинты[?]
28K
Пожалуйста, авторизуйтесь для просмотра ссылки.



в player_esp.cpp

C++:
void playeresp::eva(player_t* e, const Box& box)
{
    if (!g_cfg.player.type[type].eva)
        return;

    static auto model_index = m_modelinfo()->GetModelIndex(crypt_str("sprites/physbeam.vmt"));

    if (g_ctx.globals.should_update_beam_index)
        model_index = m_modelinfo()->GetModelIndex(crypt_str("sprites/physbeam.vmt"));
    std::vector<BeamInfo_t> new_beams;
    BeamInfo_t info;
    switch (g_ctx.globals.kills)
    {
    case 0:
        info.m_nType = TE_BEAMRINGPOINT;
        info.m_pszModelName = crypt_str("sprites/physbeam.vmt");
        info.m_nModelIndex = model_index;
        info.m_nHaloIndex = 1;
        info.m_flHaloScale = 3.0f;
        info.m_flLife = 0.05f;
        info.m_flWidth = 3.5f;
        info.m_flFadeLength = 0.0f;
        info.m_flAmplitude = 1.0f;
        info.m_flRed = (float)g_cfg.player.type[type].eva_color.r();
        info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g();
        info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b();
        info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a();
        info.m_flSpeed = 0.0f;
        info.m_nStartFrame = 0.0f;
        info.m_flFrameRate = 0.0f;
        info.m_nSegments = -1;
        info.m_nFlags = FBEAM_FADEOUT;
        info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f);
        info.m_flStartRadius = 36.5f;
        info.m_flEndRadius = 30.0f;
        info.m_bRenderable = true;
        break;

    case 1:
        info.m_nType = TE_BEAMRINGPOINT;
        info.m_pszModelName = crypt_str("sprites/physbeam.vmt");
        info.m_nModelIndex = model_index;
        info.m_nHaloIndex = 1;
        info.m_flHaloScale = 3.0f;
        info.m_flLife = 0.05f;
        info.m_flWidth = 3.5f;
        info.m_flFadeLength = 0.0f;
        info.m_flAmplitude = 1.0f;
        info.m_flRed = (float)g_cfg.player.type[type].eva_color.r();
        info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g();
        info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b();
        info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a();
        info.m_flSpeed = 0.0f;
        info.m_nStartFrame = 0.0f;
        info.m_flFrameRate = 0.0f;
        info.m_nSegments = -1;
        info.m_nFlags = FBEAM_FADEOUT;
        info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f);
        info.m_flStartRadius = 41.5f;
        info.m_flEndRadius = 35.0f;
        info.m_bRenderable = true;
        
        break;

    case 2:
        info.m_nType = TE_BEAMRINGPOINT;
        info.m_pszModelName = crypt_str("sprites/physbeam.vmt");
        info.m_nModelIndex = model_index;
        info.m_nHaloIndex = 1;
        info.m_flHaloScale = 3.0f;
        info.m_flLife = 0.05f;
        info.m_flWidth = 3.5f;
        info.m_flFadeLength = 0.0f;
        info.m_flAmplitude = 6.0f;
        info.m_flRed = (float)g_cfg.player.type[type].eva_color.r();
        info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g();
        info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b();
        info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a();
        info.m_flSpeed = 0.0f;
        info.m_nStartFrame = 0.0f;
        info.m_flFrameRate = 0.0f;
        info.m_nSegments = -1;
        info.m_nFlags = FBEAM_FADEOUT;
        info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f);
        info.m_flStartRadius = 46.5f;
        info.m_flEndRadius = 40.0f;
        info.m_bRenderable = true;
        break;

    case 3:
        info.m_nType = TE_BEAMRINGPOINT;
        info.m_pszModelName = crypt_str("sprites/physbeam.vmt");
        info.m_nModelIndex = model_index;
        info.m_nHaloIndex = 1;
        info.m_flHaloScale = 3.0f;
        info.m_flLife = 0.05f;
        info.m_flWidth = 3.5f;
        info.m_flFadeLength = 0.0f;
        info.m_flAmplitude = 9.0f;
        info.m_flRed = (float)g_cfg.player.type[type].eva_color.r();
        info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g();
        info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b();
        info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a();
        info.m_flSpeed = 0.0f;
        info.m_nStartFrame = 0.0f;
        info.m_flFrameRate = 0.0f;
        info.m_nSegments = -1;
        info.m_nFlags = FBEAM_FADEOUT;
        info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f);
        info.m_flStartRadius = 51.5f;
        info.m_flEndRadius = 45.0f;
        info.m_bRenderable = true;
        break;

    case 4:
        info.m_nType = TE_BEAMRINGPOINT;
        info.m_pszModelName = crypt_str("sprites/physbeam.vmt");
        info.m_nModelIndex = model_index;
        info.m_nHaloIndex = 1;
        info.m_flHaloScale = 3.0f;
        info.m_flLife = 0.05f;
        info.m_flWidth = 3.5f;
        info.m_flFadeLength = 0.0f;
        info.m_flAmplitude = 11.0f;
        info.m_flRed = (float)g_cfg.player.type[type].eva_color.r();
        info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g();
        info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b();
        info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a();
        info.m_flSpeed = 0.0f;
        info.m_nStartFrame = 0.0f;
        info.m_flFrameRate = 0.0f;
        info.m_nSegments = -1;
        info.m_nFlags = FBEAM_FADEOUT;
        info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f);
        info.m_flStartRadius = 56.5f;
        info.m_flEndRadius = 50.0f;
        info.m_bRenderable = true;
        break;

    case 5:
        info.m_nType = TE_BEAMRINGPOINT;
        info.m_pszModelName = crypt_str("sprites/physbeam.vmt");
        info.m_nModelIndex = model_index;
        info.m_nHaloIndex = 1;
        info.m_flHaloScale = 3.0f;
        info.m_flLife = 0.05f;
        info.m_flWidth = 3.5f;
        info.m_flFadeLength = 0.0f;
        info.m_flAmplitude = 15.0f;
        info.m_flRed = (float)g_cfg.player.type[type].eva_color.r();
        info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g();
        info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b();
        info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a();
        info.m_flSpeed = 0.0f;
        info.m_nStartFrame = 0.0f;
        info.m_flFrameRate = 0.0f;
        info.m_nSegments = -1;
        info.m_nFlags = FBEAM_FADEOUT;
        info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f);
        info.m_flStartRadius = 61.5f;
        info.m_flEndRadius = 55.0f;
        info.m_bRenderable = true;
        break;

    case 6:
        info.m_nType = TE_BEAMRINGPOINT;
        info.m_pszModelName = crypt_str("sprites/physbeam.vmt");
        info.m_nModelIndex = model_index;
        info.m_nHaloIndex = 1;
        info.m_flHaloScale = 3.0f;
        info.m_flLife = 0.05f;
        info.m_flWidth = 3.5f;
        info.m_flFadeLength = 0.0f;
        info.m_flAmplitude = 20.0f;
        info.m_flRed = (float)g_cfg.player.type[type].eva_color.r();
        info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g();
        info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b();
        info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a();
        info.m_flSpeed = 0.0f;
        info.m_nStartFrame = 0.0f;
        info.m_flFrameRate = 0.0f;
        info.m_nSegments = -1;
        info.m_nFlags = FBEAM_FADEOUT;
        info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f);
        info.m_flStartRadius = 66.5f;
        info.m_flEndRadius = 60.0f;
        info.m_bRenderable = true;
        break;

    case 7:
        info.m_nType = TE_BEAMRINGPOINT;
        info.m_pszModelName = crypt_str("sprites/physbeam.vmt");
        info.m_nModelIndex = model_index;
        info.m_nHaloIndex = 1;
        info.m_flHaloScale = 3.0f;
        info.m_flLife = 0.05f;
        info.m_flWidth = 3.5f;
        info.m_flFadeLength = 0.0f;
        info.m_flAmplitude = 25.0f;
        info.m_flRed = (float)g_cfg.player.type[type].eva_color.r();
        info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g();
        info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b();
        info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a();
        info.m_flSpeed = 0.0f;
        info.m_nStartFrame = 0.0f;
        info.m_flFrameRate = 0.0f;
        info.m_nSegments = -1;
        info.m_nFlags = FBEAM_FADEOUT;
        info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f);
        info.m_flStartRadius = 71.5f;
        info.m_flEndRadius = 65.0f;
        info.m_bRenderable = true;
        break;

    case 8:
        info.m_nType = TE_BEAMRINGPOINT;
        info.m_pszModelName = crypt_str("sprites/physbeam.vmt");
        info.m_nModelIndex = model_index;
        info.m_nHaloIndex = 1;
        info.m_flHaloScale = 3.0f;
        info.m_flLife = 0.05f;
        info.m_flWidth = 3.5f;
        info.m_flFadeLength = 0.0f;
        info.m_flAmplitude = 30.0f;
        info.m_flRed = (float)g_cfg.player.type[type].eva_color.r();
        info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g();
        info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b();
        info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a();
        info.m_flSpeed = 0.0f;
        info.m_nStartFrame = 0.0f;
        info.m_flFrameRate = 0.0f;
        info.m_nSegments = -1;
        info.m_nFlags = FBEAM_FADEOUT;
        info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f);
        info.m_flStartRadius = 76.5f;
        info.m_flEndRadius = 70.0f;
        info.m_bRenderable = true;
        break;

    default:
        info.m_nType = TE_BEAMRINGPOINT;
        info.m_pszModelName = crypt_str("sprites/physbeam.vmt");
        info.m_nModelIndex = model_index;
        info.m_nHaloIndex = 1;
        info.m_flHaloScale = 3.0f;
        info.m_flLife = 0.05f;
        info.m_flWidth = 3.5f;
        info.m_flFadeLength = 0.0f;
        info.m_flAmplitude = 30.0f;
        info.m_flRed = (float)g_cfg.player.type[type].eva_color.r();
        info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g();
        info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b();
        info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a();
        info.m_flSpeed = 0.0f;
        info.m_nStartFrame = 0.0f;
        info.m_flFrameRate = 0.0f;
        info.m_nSegments = -1;
        info.m_nFlags = FBEAM_FADEOUT;
        info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f);
        info.m_flStartRadius = 76.5f;
        info.m_flEndRadius = 70.0f;
        info.m_bRenderable = true;
        break;
    }

    auto beam_draw = m_viewrenderbeams()->CreateBeamRingPoint(info);

    if (beam_draw)
        m_viewrenderbeams()->DrawBeam(beam_draw);
}
тут же под "draw_flags(e, box);"
Код:
eva(e);
в player_esp.hpp
Код:
    void eva(player_t* e);
дальше просто кнопку с колор пикером в меню делаем, и кайфуем.

Вообще хотел что бы внутри после первого фрага рисовался ещё один трасер,но т.к. я пастер, я не знаю как это сделать.
Так что вот вам +идея.

Если кто то знает как можно отрисовать ещё один трасер внутри первого круга, пишите ;)
 
Бульдозер
Эксперт
Статус
Оффлайн
Регистрация
18 Июл 2019
Сообщения
1,231
Реакции[?]
508
Поинты[?]
2K
case 0: info.m_nType = TE_BEAMRINGPOINT; info.m_pszModelName = crypt_str("sprites/physbeam.vmt"); info.m_nModelIndex = model_index; info.m_nHaloIndex = 1; info.m_flHaloScale = 3.0f; info.m_flLife = 0.05f; info.m_flWidth = 3.5f; info.m_flFadeLength = 0.0f; info.m_flAmplitude = 1.0f; info.m_flRed = (float)g_cfg.player.type[type].eva_color.r(); info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g(); info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b(); info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a(); info.m_flSpeed = 0.0f; info.m_nStartFrame = 0.0f; info.m_flFrameRate = 0.0f; info.m_nSegments = -1; info.m_nFlags = FBEAM_FADEOUT; info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f); info.m_flStartRadius = 36.5f; info.m_flEndRadius = 30.0f; info.m_bRenderable = true; break; case 1: info.m_nType = TE_BEAMRINGPOINT; info.m_pszModelName = crypt_str("sprites/physbeam.vmt"); info.m_nModelIndex = model_index; info.m_nHaloIndex = 1; info.m_flHaloScale = 3.0f; info.m_flLife = 0.05f; info.m_flWidth = 3.5f; info.m_flFadeLength = 0.0f; info.m_flAmplitude = 1.0f; info.m_flRed = (float)g_cfg.player.type[type].eva_color.r(); info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g(); info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b(); info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a(); info.m_flSpeed = 0.0f; info.m_nStartFrame = 0.0f; info.m_flFrameRate = 0.0f; info.m_nSegments = -1; info.m_nFlags = FBEAM_FADEOUT; info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f); info.m_flStartRadius = 41.5f; info.m_flEndRadius = 35.0f; info.m_bRenderable = true; break; case 2: info.m_nType = TE_BEAMRINGPOINT; info.m_pszModelName = crypt_str("sprites/physbeam.vmt"); info.m_nModelIndex = model_index; info.m_nHaloIndex = 1; info.m_flHaloScale = 3.0f; info.m_flLife = 0.05f; info.m_flWidth = 3.5f; info.m_flFadeLength = 0.0f; info.m_flAmplitude = 6.0f; info.m_flRed = (float)g_cfg.player.type[type].eva_color.r(); info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g(); info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b(); info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a(); info.m_flSpeed = 0.0f; info.m_nStartFrame = 0.0f; info.m_flFrameRate = 0.0f; info.m_nSegments = -1; info.m_nFlags = FBEAM_FADEOUT; info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f); info.m_flStartRadius = 46.5f; info.m_flEndRadius = 40.0f; info.m_bRenderable = true; break; case 3: info.m_nType = TE_BEAMRINGPOINT; info.m_pszModelName = crypt_str("sprites/physbeam.vmt"); info.m_nModelIndex = model_index; info.m_nHaloIndex = 1; info.m_flHaloScale = 3.0f; info.m_flLife = 0.05f; info.m_flWidth = 3.5f; info.m_flFadeLength = 0.0f; info.m_flAmplitude = 9.0f; info.m_flRed = (float)g_cfg.player.type[type].eva_color.r(); info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g(); info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b(); info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a(); info.m_flSpeed = 0.0f; info.m_nStartFrame = 0.0f; info.m_flFrameRate = 0.0f; info.m_nSegments = -1; info.m_nFlags = FBEAM_FADEOUT; info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f); info.m_flStartRadius = 51.5f; info.m_flEndRadius = 45.0f; info.m_bRenderable = true; break; case 4: info.m_nType = TE_BEAMRINGPOINT; info.m_pszModelName = crypt_str("sprites/physbeam.vmt"); info.m_nModelIndex = model_index; info.m_nHaloIndex = 1; info.m_flHaloScale = 3.0f; info.m_flLife = 0.05f; info.m_flWidth = 3.5f; info.m_flFadeLength = 0.0f; info.m_flAmplitude = 11.0f; info.m_flRed = (float)g_cfg.player.type[type].eva_color.r(); info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g(); info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b(); info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a(); info.m_flSpeed = 0.0f; info.m_nStartFrame = 0.0f; info.m_flFrameRate = 0.0f; info.m_nSegments = -1; info.m_nFlags = FBEAM_FADEOUT; info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f); info.m_flStartRadius = 56.5f; info.m_flEndRadius = 50.0f; info.m_bRenderable = true; break; case 5: info.m_nType = TE_BEAMRINGPOINT; info.m_pszModelName = crypt_str("sprites/physbeam.vmt"); info.m_nModelIndex = model_index; info.m_nHaloIndex = 1; info.m_flHaloScale = 3.0f; info.m_flLife = 0.05f; info.m_flWidth = 3.5f; info.m_flFadeLength = 0.0f; info.m_flAmplitude = 15.0f; info.m_flRed = (float)g_cfg.player.type[type].eva_color.r(); info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g(); info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b(); info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a(); info.m_flSpeed = 0.0f; info.m_nStartFrame = 0.0f; info.m_flFrameRate = 0.0f; info.m_nSegments = -1; info.m_nFlags = FBEAM_FADEOUT; info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f); info.m_flStartRadius = 61.5f; info.m_flEndRadius = 55.0f; info.m_bRenderable = true; break; case 6: info.m_nType = TE_BEAMRINGPOINT; info.m_pszModelName = crypt_str("sprites/physbeam.vmt"); info.m_nModelIndex = model_index; info.m_nHaloIndex = 1; info.m_flHaloScale = 3.0f; info.m_flLife = 0.05f; info.m_flWidth = 3.5f; info.m_flFadeLength = 0.0f; info.m_flAmplitude = 20.0f; info.m_flRed = (float)g_cfg.player.type[type].eva_color.r(); info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g(); info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b(); info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a(); info.m_flSpeed = 0.0f; info.m_nStartFrame = 0.0f; info.m_flFrameRate = 0.0f; info.m_nSegments = -1; info.m_nFlags = FBEAM_FADEOUT; info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f); info.m_flStartRadius = 66.5f; info.m_flEndRadius = 60.0f; info.m_bRenderable = true; break; case 7: info.m_nType = TE_BEAMRINGPOINT; info.m_pszModelName = crypt_str("sprites/physbeam.vmt"); info.m_nModelIndex = model_index; info.m_nHaloIndex = 1; info.m_flHaloScale = 3.0f; info.m_flLife = 0.05f; info.m_flWidth = 3.5f; info.m_flFadeLength = 0.0f; info.m_flAmplitude = 25.0f; info.m_flRed = (float)g_cfg.player.type[type].eva_color.r(); info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g(); info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b(); info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a(); info.m_flSpeed = 0.0f; info.m_nStartFrame = 0.0f; info.m_flFrameRate = 0.0f; info.m_nSegments = -1; info.m_nFlags = FBEAM_FADEOUT; info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f); info.m_flStartRadius = 71.5f; info.m_flEndRadius = 65.0f; info.m_bRenderable = true; break; case 8: info.m_nType = TE_BEAMRINGPOINT; info.m_pszModelName = crypt_str("sprites/physbeam.vmt"); info.m_nModelIndex = model_index; info.m_nHaloIndex = 1; info.m_flHaloScale = 3.0f; info.m_flLife = 0.05f; info.m_flWidth = 3.5f; info.m_flFadeLength = 0.0f; info.m_flAmplitude = 30.0f; info.m_flRed = (float)g_cfg.player.type[type].eva_color.r(); info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g(); info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b(); info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a(); info.m_flSpeed = 0.0f; info.m_nStartFrame = 0.0f; info.m_flFrameRate = 0.0f; info.m_nSegments = -1; info.m_nFlags = FBEAM_FADEOUT; info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f); info.m_flStartRadius = 76.5f; info.m_flEndRadius = 70.0f; info.m_bRenderable = true; break; default: info.m_nType = TE_BEAMRINGPOINT; info.m_pszModelName = crypt_str("sprites/physbeam.vmt"); info.m_nModelIndex = model_index; info.m_nHaloIndex = 1; info.m_flHaloScale = 3.0f; info.m_flLife = 0.05f; info.m_flWidth = 3.5f; info.m_flFadeLength = 0.0f; info.m_flAmplitude = 30.0f; info.m_flRed = (float)g_cfg.player.type[type].eva_color.r(); info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g(); info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b(); info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a(); info.m_flSpeed = 0.0f; info.m_nStartFrame = 0.0f; info.m_flFrameRate = 0.0f; info.m_nSegments = -1; info.m_nFlags = FBEAM_FADEOUT; info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f); info.m_flStartRadius = 76.5f; info.m_flEndRadius = 70.0f; info.m_bRenderable = true;
пиздец.

Если кто то знает как можно отрисовать ещё один трасер внутри первого круга, пишите ;)
радиус уменьшить
 
Пользователь
Статус
Оффлайн
Регистрация
8 Июн 2020
Сообщения
196
Реакции[?]
63
Поинты[?]
28K
iq abuser
Пользователь
Статус
Оффлайн
Регистрация
16 Апр 2021
Сообщения
649
Реакции[?]
138
Поинты[?]
1K
Пытался сделать как врата гаафа из евы


а как заставит рисовать два круга одновременно?
Сделать отдельную функцию с изменением параметров и вызвать в коде 2 раза с разными параметрами
 
Пользователь
Статус
Оффлайн
Регистрация
8 Июн 2020
Сообщения
196
Реакции[?]
63
Поинты[?]
28K
Keep Ev0lving, Stay Fatal
Эксперт
Статус
Онлайн
Регистрация
6 Фев 2018
Сообщения
1,550
Реакции[?]
585
Поинты[?]
101K
Реализация очень сильно хромает, но вот идея уже +- интересная.
В следующий раз надеюсь увидеть что то такое же, но уже с красивым и приятным глазу кодом.
 
Бульдозер
Эксперт
Статус
Оффлайн
Регистрация
18 Июл 2019
Сообщения
1,231
Реакции[?]
508
Поинты[?]
2K
Реализация очень сильно хромает, но вот идея уже +- интересная.
В следующий раз надеюсь увидеть что то такое же, но уже с красивым и приятным глазу кодом.
так в никсваре похожая луашка была уже полгода назад если не больше
 
Эксперт
Статус
Оффлайн
Регистрация
30 Дек 2019
Сообщения
1,967
Реакции[?]
958
Поинты[?]
19K
а зачем делать столько бимов, ещё и через свитч, если ты меняешь дай бог 4 значения? математику подарить?
 
Пользователь
Статус
Оффлайн
Регистрация
8 Июн 2020
Сообщения
196
Реакции[?]
63
Поинты[?]
28K
а зачем делать столько бимов, ещё и через свитч, если ты меняешь дай бог 4 значения? математику подарить?
Делаю как умею. Критикуешь, предлагай.
пиздец насколько же это хуево выглядит
Если ты про код, тут да.
А если ты про нимб, то тут вкусовщина. Не нравится, не юзай.
 
Бульдозер
Эксперт
Статус
Оффлайн
Регистрация
18 Июл 2019
Сообщения
1,231
Реакции[?]
508
Поинты[?]
2K
Я бы сделал, да вот лень как-то
какой нахуй лень, минуту заняло вычистить говно

C++:
void playeresp::eva(player_t* e, const Box& box)
{
    if (!g_cfg.player.type[type].eva)
        return;

    static auto model_index = m_modelinfo()->GetModelIndex(crypt_str("sprites/physbeam.vmt"));

    if (g_ctx.globals.should_update_beam_index)
        model_index = m_modelinfo()->GetModelIndex(crypt_str("sprites/physbeam.vmt"));
    std::vector<BeamInfo_t> new_beams;
    BeamInfo_t info;
   
        info.m_nType = TE_BEAMRINGPOINT;
        info.m_pszModelName = crypt_str("sprites/physbeam.vmt");
        info.m_nModelIndex = model_index;
        info.m_nHaloIndex = 1;
        info.m_flHaloScale = 3.0f;
        info.m_flLife = 0.05f;
        info.m_flWidth = 3.5f;
        info.m_flFadeLength = 0.0f;
        info.m_flAmplitude = 1.f + 4.f * g_ctx.globals.kills;
        info.m_flRed = (float)g_cfg.player.type[type].eva_color.r();
        info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g();
        info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b();
        info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a();
        info.m_flSpeed = 0.0f;
        info.m_nStartFrame = 0.0f;
        info.m_flFrameRate = 0.0f;
        info.m_nSegments = -1;
        info.m_nFlags = FBEAM_FADEOUT;
        info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f);
        info.m_flStartRadius = 35.0f + g_ctx.globals.kills * 5.f;
        info.m_flEndRadius = 30.0f + g_ctx.globals.kills * 5.f;
        info.m_bRenderable = true;

    auto beam_draw = m_viewrenderbeams()->CreateBeamRingPoint(info);

    if (beam_draw)
        m_viewrenderbeams()->DrawBeam(beam_draw);
}
 
Эксперт
Статус
Оффлайн
Регистрация
30 Дек 2019
Сообщения
1,967
Реакции[?]
958
Поинты[?]
19K
какой нахуй лень, минуту заняло вычистить говно

C++:
void playeresp::eva(player_t* e, const Box& box)
{
    if (!g_cfg.player.type[type].eva)
        return;

    static auto model_index = m_modelinfo()->GetModelIndex(crypt_str("sprites/physbeam.vmt"));

    if (g_ctx.globals.should_update_beam_index)
        model_index = m_modelinfo()->GetModelIndex(crypt_str("sprites/physbeam.vmt"));
    std::vector<BeamInfo_t> new_beams;
    BeamInfo_t info;
  
        info.m_nType = TE_BEAMRINGPOINT;
        info.m_pszModelName = crypt_str("sprites/physbeam.vmt");
        info.m_nModelIndex = model_index;
        info.m_nHaloIndex = 1;
        info.m_flHaloScale = 3.0f;
        info.m_flLife = 0.05f;
        info.m_flWidth = 3.5f;
        info.m_flFadeLength = 0.0f;
        info.m_flAmplitude = 1.f + 4.f * g_ctx.globals.kills;
        info.m_flRed = (float)g_cfg.player.type[type].eva_color.r();
        info.m_flGreen = (float)g_cfg.player.type[type].eva_color.g();
        info.m_flBlue = (float)g_cfg.player.type[type].eva_color.b();
        info.m_flBrightness = (float)g_cfg.player.type[type].eva_color.a();
        info.m_flSpeed = 0.0f;
        info.m_nStartFrame = 0.0f;
        info.m_flFrameRate = 0.0f;
        info.m_nSegments = -1;
        info.m_nFlags = FBEAM_FADEOUT;
        info.m_vecCenter = e->GetAbsOrigin() + Vector(0.0f, 0.0f, 70.0f);
        info.m_flStartRadius = 35.0f + g_ctx.globals.kills * 5.f;
        info.m_flEndRadius = 30.0f + g_ctx.globals.kills * 5.f;
        info.m_bRenderable = true;

    auto beam_draw = m_viewrenderbeams()->CreateBeamRingPoint(info);

    if (beam_draw)
        m_viewrenderbeams()->DrawBeam(beam_draw);
}
Ну я знаю, но мне лень
 
Сверху Снизу