$ underrow $
-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
my discord : Dutu#5071
//to esp.cpp
//to esp.cpp too
//to esp.cpp
C++:
void GradientLine2(int x, int y, int w, int h, Color c1, Color c2)
{
g_pSurface->FilledRect(x, y, w, h, c1);
BYTE first = c2.red;
BYTE second = c2.green;
BYTE third = c2.blue;
for (int i = 0; i < w; i++)
{
float fi = i, fw = w;
float a = fi / fw;
DWORD ia = a * 255;
g_pSurface->FilledRect(x + i, y, 1, h, Color(first, second, third, ia));
}
}
C++:
void ESP::WaterMark()
{
if (SETTINGS::settings.watermark)
{
static unsigned int s, v, i;
static float h, r, g, b, f, p, q, t;
h = g_pGlobalVars->realtime * 0.1f;
s = 1;
v = 1;
i = floor(h * 6);
f = h * 6 - i;
p = v * (1 - s);
q = v * (1 - f * s);
t = v * (1 - (1 - f) * s);
switch (i % 6)
{
case 0: r = v, g = t, b = p; break;
case 1: r = q, g = v, b = p; break;
case 2: r = p, g = v, b = t; break;
case 3: r = p, g = q, b = v; break;
case 4: r = t, g = p, b = v; break;
case 5: r = v, g = p, b = q; break;
}
r = round(r * 255), g = round(g * 255), b = round(b * 255);
std::stringstream ss;
std::stringstream rr;
int width, height;
g_pEngine->GetScreenSize(width, height);
g_pSurface->FilledRect(width - 300, 12, 290, 50, Color(40, 40, 40, 200));
g_pSurface->FilledRect(width - 295, 17, 280, 40, Color(0, 0, 0, 255));
g_pSurface->OutlinedRect(width - 295, 17, 280, 40, Color(200, 200, 200, 50));
g_pSurface->OutlinedRect(width - 300, 12, 290, 50, Color(200, 200, 200, 50));
GradientLine2(width - 293, 17, 276, 3, Color(r, g, b, 255), Color(b, r, g, 255));
//first text
g_pSurface->DrawT(width - 285, 30, Color(255, 255, 255), g::water_font, false, "CHAOTIC.");
g_pSurface->DrawT(width - 242, 30, Color(r, g, b, 255), g::water_font, false, "PUB");
// | for fps
g_pSurface->DrawT(width - 227, 30, Color(255, 255, 255), g::water_font, false, " | ");
//draw fps text + fps pos
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;
}
ss << fps;
g_pSurface->DrawT(width - 216, 30, Color(255, 255, 255), g::water_font, false, "FPS: ");
g_pSurface->DrawT(width - 190, 30, Color(r, g, b, 255), g::water_font, false, ss.str().c_str());
// | for ping
g_pSurface->DrawT(width - 180, 30, Color(255, 255, 255), g::water_font, false, " | ");
//ping text + ping stuff
auto local_player = reinterpret_cast<C_BaseEntity*>(g_pEntityList->GetClientEntity(g_pEngine->GetLocalPlayer()));
auto net_channel = g_pEngine->GetNetChannelInfo();
std::string outgoing = local_player ? std::to_string((int)(net_channel->GetLatency(FLOW_OUTGOING) * 1000)) : "0";
g_pSurface->DrawT(width - 168, 30, Color(255, 255, 255), g::water_font, false, "PING: ");
g_pSurface->DrawT(width - 135, 30, Color(r, g, b, 255), g::water_font, false, outgoing.c_str());
// | for time
g_pSurface->DrawT(width - 130, 30, Color(255, 255, 255), g::water_font, false, " | ");
//time text + stuff for time
g_pSurface->DrawT(width - 118, 30, Color(255, 255, 255), g::water_font, false, "TIME: ");
g_pSurface->DrawT(width - 90, 30, Color(r, g, b, 255), g::water_font, false, currentDateTime().c_str());
// | for build
g_pSurface->DrawT(width - 54, 30, Color(255, 255, 255), g::water_font, false, " | ");
//text for build
g_pSurface->DrawT(width - 43, 30, Color(r, g, b, 255), g::water_font, false, "v1.3");
}
}
Вложения
-
8.7 KB Просмотры: 973