-
Автор темы
- #1
а вроде супримаси а вроде и гавно
ss:
Код:
const std::string currentDateTime() {
time_t now = time(0);
struct tm tstruct;
char buf[80];
tstruct = *localtime(&now);
strftime(buf, sizeof(buf), "%X", &tstruct);
return buf;
}
void otheresp::watermark()
{
if (!g_cfg.misc.watermark)
return;
int screen_x, screen_y;
g_csgo.m_engine()->GetScreenSize(screen_x, screen_y);
std::stringstream ss;
auto net_channel = g_csgo.m_engine()->GetNetChannelInfo();
auto local_player = reinterpret_cast<C_BaseEntity*>(g_csgo.m_entitylist()->GetClientEntity(g_csgo.m_engine()->GetLocalPlayer()));
std::string outgoing = local_player ? std::to_string((int)(net_channel->GetLatency(FLOW_OUTGOING) * 1000)) : "0";
if (g_csgo.m_engine()->IsConnected())
{
ss << "supremacy | " << "rtt: " << outgoing << "ms | rate: 64" << " | " << currentDateTime().c_str();
}
else
{
ss << "supremacy | " << currentDateTime().c_str();
}
int textsize = render::get().text_width(fonts[eventwatermark], ss.str().c_str());
render::get().rect_filled((screen_x - 1) - (textsize + 11), 6, textsize + 5, 19, Color(178, 80, 105, 255));
render::get().text(fonts[eventwatermark], (screen_x - 0) - (textsize + 9), 9, Color(230, 230, 230, 255), HFONT_OFF_SCREEN, ss.str().c_str());
// "Verdana", 14, 0, FONTFLAG_ANTIALIAS | FONTFLAG_DROPSHADOW
}