What's new

Welcome to HvH Forum!

SignUp Now! Download Free HvH CS2/CS:GO Cheats, CFG, LUA/JS Scripts, And More!


SignUp Now!

Source Code Animated watermark for supremacy

Newbie HvHer
User ID
23365
Messages
12
Reactions
4
Level
4
video -

client.cpp:
void Client::DrawHUD() {
    int ms = std::max(0, (int)std::round(g_cl.m_latency * 1000.f));
    int rate = (int)std::round(1.f / g_csgo.m_globals->m_interval);
    Color color = g_gui.m_color;

    time_t t = std::time(nullptr);
    std::ostringstream time;
    time << std::put_time(std::localtime(&t), ("%H:%M:%S"));

    bool show_user = (g_menu.main.misc.watermark.get(0));
    bool show_build = (g_menu.main.misc.watermark.get(1));
    bool show_delay = (g_menu.main.misc.watermark.get(2));
    bool show_shots = (g_menu.main.misc.watermark.get(3));
    bool show_time = (g_menu.main.misc.watermark.get(4));

//change to whatever name u want
    std::string text = "paradox";

    if (show_user) {
        text += tfm::format(XOR(" | %s"), g_cl.m_userr);
    }

    if (show_build) {
        text += tfm::format(XOR(" | %s"), g_cl.m_build);
    }

    if (show_delay) {
        if (ms == 0) {
            text += XOR(" | local server");
        } else {
            text += tfm::format(XOR(" | delay: %i ms"), ms);
        }
    }

    if (show_shots) {
        text += tfm::format(XOR(" | taps: %i"), g_shots.taps);
    }

    if (show_time) {
        text += tfm::format(XOR(" | %s"), time.str().data());
    }

    render::FontSize_t target_size = render::hud.size(text);

    static float current_width = 0;
    static float current_height = 0;
    float animation_speed = 0.2f;
    current_width += (target_size.m_width - current_width) * animation_speed;
    current_height += (target_size.m_height - current_height) * animation_speed;

//persona
    int rounded_width = std::round(current_width);
    int rounded_height = std::round(current_height);
    int padding = 5;
    int radius = 5;
    int border_thickness = 1; // Border thickness
    int watermark_width = rounded_width + 2 * padding + 2 * border_thickness;
    int watermark_height = rounded_height + 2 * padding + 2 * border_thickness;
    int x_position = m_width - watermark_width - 10;
    int y_position = 10;

    render::round_rect(x_position, y_position, watermark_width, watermark_height, radius, { 255, 255, 255, 60 });
    render::round_rect(x_position + border_thickness, y_position + border_thickness, rounded_width + 2 * padding, rounded_height + 2 * padding, radius, { 23, 23, 23, 255 });
    int text_y_position = y_position + padding + (watermark_height - rounded_height) / 10;
    render::hud.string(m_width - padding - 10, text_y_position, { 255, 255, 255, 255 }, text, render::ALIGN_RIGHT);
}


round_rect:
void render::round_rect(int x, int y, int w, int h, int r, Color color) {
    Vertex round[64];

    for (int i = 0; i < 4; i++) {
        int _x = x + ((i < 2) ? (w - r) : r);
        int _y = y + ((i % 3) ? (h - r) : r);

        float a = 90.f * i;

        for (int j = 0; j < 16; j++) {
            float _a = math::deg_to_rad(a + j * 6.f);

            round[(i * 16) + j] = Vertex(vec2_t(_x + r * sin(_a), _y - r * cos(_a)));
        }
    }

    g_csgo.m_surface->DrawSetColor(color);
    g_csgo.m_surface->DrawTexturedPolygon(64, round);
}

in render.h void round_rect(int x, int y, int w, int h, int r, Color color);
 
Wine Lover
Administrator
User ID
7213
Messages
330
Reactions
1,078
Level
74
looks meh, the white is too vibrant makes the outline look like garbage there is no actual fun added to it, try adding a blur or some shadow, adding a slight texture for the watermark background to give it life, less rounding because jesus that looks like a cylinder not a rectangle
 
Wine Lover
Administrator
User ID
7213
Messages
330
Reactions
1,078
Level
74
but the animation seems fine, just fix the width on the left because it glitches inside the text when adding and sometimes its too big when removing items (during animation only)
 

052

Rookie HvHer
User ID
17168
Messages
47
Reactions
14
Level
6
ai code , overall : bad hack, good looking menu hmu for fix your aimbot. but ye i guess cool post
 
ind.text = "LC" ;
User ID
44600
Messages
208
Reactions
53
Level
22
i am glad the showcase of the watermark isn't available anymore, i hope you learn that you don't have to create variables in such a shit fashion for everything, have a good day.
 
Newbie HvHer
User ID
23365
Messages
12
Reactions
4
Level
4
i am glad the showcase of the watermark isn't available anymore, i hope you learn that you don't have to create variables in such a shit fashion for everything, have a good day.
deep.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Top