-
Автор темы
- #1
может кому-то понадобится, хоть что-то новое в свою пасту добавить)
Код:
void otheresp::custom_scopes_lines()
{
if (!g_ctx.local()->is_alive()) //-V807
return;
if (!g_cfg.esp.removals[REMOVALS_SCOPE])
return;
if (!g_cfg.esp.custom_scopes_line)
return;
auto weapon = g_ctx.local()->m_hActiveWeapon().Get();
if (!weapon)
return;
auto is_scoped = g_ctx.globals.scoped && weapon->is_sniper() && weapon->m_zoomLevel();
if (!is_scoped)
return;
static int width, height;
m_engine()->GetScreenSize(width, height);
auto offset = g_cfg.esp.scopes_line_offset;
auto leng = g_cfg.esp.scopes_line_width;
auto accent = g_cfg.esp.scopes_line_color;
auto accent2 = Color(g_cfg.esp.scopes_line_color.r(), g_cfg.esp.scopes_line_color.g(), g_cfg.esp.scopes_line_color.b(), 0);
render::get().gradient(width / 2 + offset, height / 2, leng, 1, accent, accent2, GradientType::GRADIENT_HORIZONTAL);
render::get().gradient(width / 2 - leng - offset, height / 2, leng, 1, accent2, accent, GradientType::GRADIENT_HORIZONTAL);
render::get().gradient(width / 2, height / 2 + offset, 1, leng, accent, accent2, GradientType::GRADIENT_VERTICAL);
render::get().gradient(width / 2, height / 2 - leng - offset, 1, leng, accent2, accent, GradientType::GRADIENT_VERTICAL);
}