Web developer / designer
-
Автор темы
- #1
Watermark:
Visuals.cpp
PaintTraverse.h
Antiaim indicator + line:
Menu.cpp
get name from windows:
credits: Nova7311
Visuals.cpp
C++:
void CVisuals::DrawWatermark() {
auto tickrate = std::to_string((int)(1.0f / interfaces.global_vars->interval_per_tick));
auto output = str("cheat | ") + csgo->username + str(" | ") + vars.misc.time;
if (interfaces.engine->IsInGame() && interfaces.engine->IsConnected() && csgo->local)
{
auto nci = interfaces.engine->GetNetChannelInfo();
if (nci)
{
auto server = nci->GetAddress();
if (!strcmp(server, str("loopback")))
server = str("local server");
else if (csgo->game_rules->IsValveDS())
server = str("valve server");
output = str("cheat | ") + csgo->username + str(" | ") + server + str(" | ping: ") + std::to_string(vars.misc.ping) + str(" ms | ") + tickrate + str(" tick | ") + vars.misc.time;
}
}
std::transform(output.begin(), output.end(), output.begin(), ::toupper);
ImGui::PushFont(fonts::very_small);
const auto& text_size = ImGui::CalcTextSize(output.c_str());
ImGui::PopFont();
g_Render->FilledRect(
((csgo->w - text_size.x) / 2) - 2,
+5,
text_size.x + 3,
text_size.y - 1,
color_t(10, 10, 10, 150));
g_Render->DrawString((csgo->w / 2),
+5,
color_t(255, 255, 255, 255),
render::outline | render::centered_x,
fonts::very_small,
output.c_str());
}
C++:
auto nci = interfaces.engine->GetNetChannelInfo();
if (nci)
{
auto latency = interfaces.engine->IsPlayingDemo() ? 0.0f : nci->GetAvgLatency(FLOW_OUTGOING);
if (latency)
{
static auto cl_updaterate = interfaces.cvars->FindVar(hs::cl_updaterate.s().c_str());
latency -= 0.5f / cl_updaterate->GetFloat();
}
vars.misc.ping = (int)(max(0.0f, latency) * 1000.0f);
}
time_t lt;
struct tm* t_m;
lt = time(nullptr);
t_m = localtime(<);
auto time_h = t_m->tm_hour;
auto time_m = t_m->tm_min;
auto time_s = t_m->tm_sec;
std::string time;
if (time_h < 10)
time += "0";
time += std::to_string(time_h) + ":";
if (time_m < 10)
time += "0";
time += std::to_string(time_m) + ":";
if (time_s < 10)
time += "0";
time += std::to_string(time_s);
vars.misc.time = std::move(time);
Menu.cpp
C++:
void CMenu::draw_indicators()
{
int x, y;
interfaces.engine->GetScreenSize(x, y);
if (vars.misc.aa_monitor && interfaces.engine->IsInGame() && interfaces.engine->IsConnected() && csgo->local->isAlive()) {
Vector rAngle;
interfaces.engine->GetViewAngles(rAngle);
auto view = rAngle.y - 180;
interfaces.engine->GetScreenSize(x, y);
auto pos = Vector2D(x / 2, y / 2);
float lby = adjust(csgo->local->GetLBY() - view);
float desync = adjust(csgo->FakeAngle.y - view);
float real = adjust(csgo->VisualAngle.y - view);
g_Render->Arc(pos.x, pos.y, 15, 0, 360, color_t(28, 31, 34, 140), 4.f);
g_Render->Arc(pos.x, pos.y, 15, lby - 10, lby + 10, color_t(0, 0, 255), 4.f); //LBY
g_Render->Arc(pos.x, pos.y, 15, desync - 10, desync + 10, color_t(255, 0, 0), 4.f); //DESYNC
g_Render->Arc(pos.x, pos.y, 15, real - 10, real + 10, color_t(0, 255, 0), 4.f); //REAL
}
// line on top
auto color = style.get_color(c_style::accented_color);
g_Render->FilledRect(0, 0, x, 4, color, 0);
}
C++:
GetEnvironmentVariable((LPCTSTR)"USERPROFILE", (LPSTR)path, (DWORD)MAX_PATH);
name = &path[std::strlen(path) - 1];
for (; *name != '\\'; --name);
++name;
csgo->username = name;
Последнее редактирование: