how to make the same Molotov timing as NLчто ты нахуй несешь
if (!g_cfg.esp.molotov_timer)
return;
auto inferno = reinterpret_cast<inferno_t*>(entity);
auto origininf = inferno->GetAbsOrigin();
Vector screen_origin_m;
if (!math::world_to_screen(origininf, screen_origin_m))
return;
auto spawn_time = inferno->get_spawn_time();
auto factor = (spawn_time + inferno_t::get_expiry_time() - m_globals()->m_curtime) / inferno_t::get_expiry_time();
static auto size_m = Vector2D(35.0f, 5.0f);
render::get().circle_filled(screen_origin_m.x, screen_origin_m.y - size_m.y * 0.5f, 60, 20, Color(15, 15, 15, 187));
render::get().CircularProgressBar(screen_origin_m.x, screen_origin_m.y - size_m.y * 0.5f, 17, 20, 0, 360 * factor, Color(255, 255, 255, 187), true);
render::get().text(fonts[ESP], screen_origin_m.x, screen_origin_m.y - size_m.y * 0.5f, g_cfg.esp.molotov_timer_color, HFONT_CENTERED_X | HFONT_CENTERED_Y, "FIRE");
Тебе нужен таймер с round progress bar?how to implement the Molotov timing method like NL style?
like this
I checked this post and the method used in the post is to draw lines.
It's not circle.
are there any examples of similar timing methods? Please?.
yepТебе нужен таймер с round progress bar?
draw lines, not circle.Посмотреть вложение 152562
this?
Код:if (!g_cfg.esp.molotov_timer) return; auto inferno = reinterpret_cast<inferno_t*>(entity); auto origininf = inferno->GetAbsOrigin(); Vector screen_origin_m; if (!math::world_to_screen(origininf, screen_origin_m)) return; auto spawn_time = inferno->get_spawn_time(); auto factor = (spawn_time + inferno_t::get_expiry_time() - m_globals()->m_curtime) / inferno_t::get_expiry_time(); static auto size_m = Vector2D(35.0f, 5.0f); render::get().circle_filled(screen_origin_m.x, screen_origin_m.y - size_m.y * 0.5f, 60, 20, Color(15, 15, 15, 187)); render::get().CircularProgressBar(screen_origin_m.x, screen_origin_m.y - size_m.y * 0.5f, 17, 20, 0, 360 * factor, Color(255, 255, 255, 187), true); render::get().text(fonts[ESP], screen_origin_m.x, screen_origin_m.y - size_m.y * 0.5f, g_cfg.esp.molotov_timer_color, HFONT_CENTERED_X | HFONT_CENTERED_Y, "FIRE");
where in your gif u see lines?yep
draw lines, not circle.
можно ещё иконку для красоты добавить в рендерПосмотреть вложение 152562
this?
Код:if (!g_cfg.esp.molotov_timer) return; auto inferno = reinterpret_cast<inferno_t*>(entity); auto origininf = inferno->GetAbsOrigin(); Vector screen_origin_m; if (!math::world_to_screen(origininf, screen_origin_m)) return; auto spawn_time = inferno->get_spawn_time(); auto factor = (spawn_time + inferno_t::get_expiry_time() - m_globals()->m_curtime) / inferno_t::get_expiry_time(); static auto size_m = Vector2D(35.0f, 5.0f); render::get().circle_filled(screen_origin_m.x, screen_origin_m.y - size_m.y * 0.5f, 60, 20, Color(15, 15, 15, 187)); render::get().CircularProgressBar(screen_origin_m.x, screen_origin_m.y - size_m.y * 0.5f, 17, 20, 0, 360 * factor, Color(255, 255, 255, 187), true); render::get().text(fonts[ESP], screen_origin_m.x, screen_origin_m.y - size_m.y * 0.5f, g_cfg.esp.molotov_timer_color, HFONT_CENTERED_X | HFONT_CENTERED_Y, "FIRE");
GIF, not used.where in your gif u see lines?
нет, ну ты точно хуйню несешь челGIF, not used.
GIF uses sin/cos for calculation.
my math is very poor. even if I know what to use, I still can't calculate.
I asked some people and the answer was to use sin/cos.нет, ну ты точно хуйню несешь чел
u just could use for render circle progress bar this:I asked some people and the answer was to use sin/cos.
Or draw lines.
void render::CircularProgressBar (int x, int y, int r1, int r2, int s, int d, Color col, bool inverse)
{
for (int i = s; i <s + d; i ++)
{
auto rad = i * M_PI / 180;
if (!inverse)
line (x + cos (rad) * r1, y + sin (rad) * r1, x + cos (rad) * r2, y + sin (rad) * r2, col);
else
line (x - sin (rad) * r1, y - cos (rad) * r1, x - sin (rad) * r2, y - cos (rad) * r2, col);
}
}
static float rotate = 0.f;
if (rotate <= 1.f)
rotate += 0.01f;
else
rotate = 0.0;
CircularProgressBar (100, 100, 10, 15, 90, 360 * rotate, ImColor(255, 255, 255));
вот тебе отрисовка линии, подгоняй под свой сдк.I asked some people and the answer was to use sin/cos.
Or draw lines.
void render_manager::line(int x, int y, int x2, int y2, Color color, int thickline)
{
if (!m_Surface())
return;
color.SetAlpha(static_cast<int>(color.a() * alpha_factor));
if (thickline) {
Vertex_t vertices[6];
vertices[0].Init(vec2(x, y));
vertices[1].Init(vec2(x2, y2));
vertices[2].Init(vec2(x, y + thickline));
vertices[3].Init(vec2(x2, y2 + thickline));
vertices[4].Init(vec2(x, y - thickline));
vertices[5].Init(vec2(x2, y2 - thickline));
m_Surface()->DrawSetColor(color);
m_Surface()->DrawTexturedPolyLine(vertices, sizeof vertices / sizeof Vertex_t);
}
else {
m_Surface()->DrawSetColor(color);
m_Surface()->DrawLine(x, y, x2, y2);
}
}
он скорее всего лв пастит, в лв есть отрисовка линиивот тебе отрисовка линии, подгоняй под свой сдк.
C++:void render_manager::line(int x, int y, int x2, int y2, Color color, int thickline) { if (!m_Surface()) return; color.SetAlpha(static_cast<int>(color.a() * alpha_factor)); if (thickline) { Vertex_t vertices[6]; vertices[0].Init(vec2(x, y)); vertices[1].Init(vec2(x2, y2)); vertices[2].Init(vec2(x, y + thickline)); vertices[3].Init(vec2(x2, y2 + thickline)); vertices[4].Init(vec2(x, y - thickline)); vertices[5].Init(vec2(x2, y2 - thickline)); m_Surface()->DrawSetColor(color); m_Surface()->DrawTexturedPolyLine(vertices, sizeof vertices / sizeof Vertex_t); } else { m_Surface()->DrawSetColor(color); m_Surface()->DrawLine(x, y, x2, y2); } }
похуй, я отрисовку линии как в вантапе скинулон скорее всего лв пастит, в лв есть отрисовка линии
Проект предоставляет различный материал, относящийся к сфере киберспорта, программирования, ПО для игр, а также позволяет его участникам общаться на многие другие темы. Почта для жалоб: admin@yougame.biz