-
Автор темы
- #1
вантап вотерка (почти) под хуО
вроде норм, мне зашло
C++:
if (Config.Watermark)
{
int width, height;
g_pEngine->GetScreenSize(width, height);
static int fps, old_tick_count;
if ((g_pGlobalVars->tickcount - old_tick_count) > 50) {
fps = static_cast<int>(1.f / g_pGlobalVars->frametime);
old_tick_count = g_pGlobalVars->tickcount;
}
char FPS;
int radix = 10;
static char buffer[256];
std::stringstream ss;
static unsigned int last_time;
/////rainbow sync//////
last_time = GetTickCount();
Color rainbow;
rainbow.FromHSV(fmod(last_time * 0.0002f, 1.f), 1.f, 0.5f);
//////////////////////
auto net_channel = g_pEngine->GetNetChannelInfo();
auto local_player = reinterpret_cast<C_BaseEntity*>(g_pEntityList->GetClientEntity(g_pEngine->GetLocalPlayer()));
std::string incoming = local_player ? std::to_string((int)(net_channel->GetLatency(FLOW_INCOMING) * 1000)) : "0";
std::string outgoing = local_player ? std::to_string((int)(net_channel->GetLatency(FLOW_OUTGOING) * 1000)) : "0";
ss << "poXWare" << " | incoming: " << incoming.c_str() << "ms" << " | outgoing: " << outgoing.c_str() << "ms" <<" | fps: " << fps;
RECT TextSize = g_pSurface->GetTextSizeRect(g::Tahoma, ss.str().c_str());
g_pSurface->FilledRect(width - (TextSize.right + 20), 25, TextSize.right + 10, 2, rainbow);
g_pSurface->FilledRect(width - (TextSize.right + 20), 5, TextSize.right + 10, 20, Color(33, 33, 33));
g_pSurface->DrawT(width - (TextSize.right + 15), 8, Color(200, 200, 200), g::Tahoma, false, ss.str().c_str());
}