-
Автор темы
- #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();
char path[MAX_PATH], * name = NULL;
GetEnvironmentVariable((LPCTSTR)"USERPROFILE", (LPSTR)path, (DWORD)MAX_PATH);
name = &path[std::strlen(path) - 1];
for (; *name != '\\'; --name);
++name;
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 << "Legendware | " << name << " | " << outgoing << " ms | 64 tick" << " | " << currentDateTime().c_str();
}
else
{
ss << "Legendware | " << name << " | " << 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, 18, Color(0, 0, 0, 150));
render::get().rect_filled((screen_x - 1) - (textsize + 11), 6, textsize + 5, 2, Color(g_cfg.menu.menu_theme[0]));
render::get().rect_filled((screen_x - 1) - (textsize + 11), 24, textsize + 5, 2, Color(g_cfg.menu.menu_theme[0]));
render::get().text(fonts[eventwatermark], (screen_x - 0) - (textsize + 9), 9, Color::White, HFONT_OFF_SCREEN, ss.str().c_str());
// "Segou UI", 14, 500, FONTFLAG_ANTIALIAS | FONTFLAG_DROPSHADOW
}
Последнее редактирование: