Пользователь
-
Автор темы
- #1
Onetap v2 watermark.
ss
ss
C++:
void misc::watermark()
{
if (!g_cfg.menu.watermark)
return;
auto width = 0, height = 0;
m_engine()->GetScreenSize(width, height);
int tickrate = 1 / m_globals()->m_intervalpertick;
const char* server = " ";
std::string cheat_name = "onetap.su";
std::string watermark_text = cheat_name + " | " + g_ctx.username + " | " + g_ctx.globals.time;
if (m_engine()->IsInGame())
{
auto nci = m_engine()->GetNetChannelInfo();
if (nci)
{
server = nci->GetAddress();
if (!strcmp(server, crypt_str("loopback")))
server = crypt_str("local server");
else if (m_gamerules()->m_bIsValveDS())
server = crypt_str("valve");
}
watermark_text = cheat_name + " | " + g_ctx.username + " | " + server + " | " + "delay: " + std::to_string(g_ctx.globals.ping) + "ms | " + std::to_string(tickrate) + "tick | " + g_ctx.globals.time;
}
int text_width = Render::Get().TextSize(fonts[WATERMARK_FONT], watermark_text.c_str()).x;
Render::Get().DrawRoundedRectangle(width - (text_width + 15 + 14), 14, (text_width + 16), 30, 4, Color(40, 40, 40));
Render::Get().DrawRoundedRectangle(width - (text_width + 14 + 14), 15, (text_width + 14), 8, 4, Color(250, 250, 0));
Render::Get().DrawRoundedRectangle(width - (text_width + 14 + 14), 21, (text_width + 14), 22, 4, Color(60, 60, 60));
Render::Get().DrawText(fonts[WATERMARK_FONT], width - (text_width + 14 + 7), 25, Color(255, 255, 255), HFONT_CENTERED_NONE, watermark_text.c_str());
}