Welcome to hackvshack.net Forum!
Download Free HvH CS2/CS:GO Cheats, CFG, LUA/JS Scripts, and More!
Register

C++ Supremacy jumpscout autostop

zaneATAT

Expert HvHer
User ID:
59937
Messages:
172
Reactions:
306
Badges:
18
REP:
−0/2+
Level:
150
This is basically the first thing I code in c++ (I'm a java developer)
I didn't code it in default supremacy but in a different supremacy based cheat, almost same thing u get the idea

In some supremacy pastes like eax and taphack there's a feature called "full stop in air" or "instant stop in air" this shit is awesome, I hit some crazy high velocity jumpscouts with it, gives dopamine like call of duty 360 noscopes
However machine is better than human, I failed alot manually pressing the bind when reaching the apex/vertex of the jump (when scout is fully accurate)

Here's something that automates it (the supremacy paste i based this off already had in air autostop, but its garbage like basically all cheats, i didn't touch nor even read its code)

And the "isAtJumpApex()" setting i asked chatgpt to do it before on lua because i didn't figure out the math (previously i just did if velocity.z = 0 but that rarely was true)
this code i ported from the lua script chatgpt and i made 1 month ago into c++

Currently only issue is that it doesn't commit to stopping, idk how to explain
I'll fix it and update this post

ALL CODE BELOW

[REACT=1, 2, 4]
jump apex detected:
Expand Collapse Copy
bool Aimbot::isAtJumpApex() {



    if (!g_cl.m_local || !g_cl.m_local->alive()) {


        return false;


    }



    if ((g_cl.m_flags & FL_ONGROUND) && g_cl.m_local->m_fFlags() & FL_ONGROUND) {


        return false;


    }


    static bool apexDetected = false;


    static float lastApexTime = 0.0f;



    float currentTime = g_csgo.m_globals->m_curtime;



    // keep apex true for 0.1 seconds after we've detected it


    if (apexDetected && (currentTime - lastApexTime < 0.1)) {


        return true;


    }



    if (currentTime - lastApexTime >= 0.1f) {


        apexDetected = false;


    }



    // don't calculate every frame to avoid fps drops


    static float lastCheckTime = 0.0f;


    if (currentTime - lastCheckTime < 0.05f) {


        return apexDetected;


    }


    lastCheckTime = currentTime;



    vec3_t abs_velocity = g_cl.m_local->m_vecAbsVelocity();


    float vertical_velocity = abs_velocity.z;



    // If vertical velocity crosses 0 (and in the air), detect apex


    if ((prevVerticalVelocity > 0 && vertical_velocity <= 0) || vertical_velocity == 0) {


        lastApexTime = currentTime;


        apexDetected = true;


    }



    prevVerticalVelocity = vertical_velocity;


    return apexDetected;


}
[/REACT]
fixed code not showing lol
[REACT=1, 2, 4]
in aimbot.find():
Expand Collapse Copy
    const bool ground = (combinedFlags & FL_ONGROUND);

    const bool inAir = !ground;


    const bool found_target = best.player && best.record;

    const bool high_damage = found_target && best.damage >= 100;


    if (high_damage) {

        if (inAir) {

            shouldAirStop = isAtJumpApex();

            if (shouldAirStop) {

                foundTarget = true;

                g_notify.add(XOR("Jumpscout initiated...\n"), Color(50, 255, 50, 255));

            }

        }

        else {

            foundTarget = true;

        }

    }

    else {

        foundTarget = shouldAirStop = false;

    }


    if ((ground && g_menu.main.aimbot.quick_stop.get() && found_target) ||

        (m_found_hit && (g_cl.m_weapon_fire || (g_menu.main.aimbot.quick_stop_mode.get(1) && g_cl.m_player_fire)))) {

        m_stop = true;

    }
[/REACT]

[REACT=1, 2, 4]
in client.cpp:
Expand Collapse Copy
void Client::DoMove() {



    const bool is_on_ground = m_flags & FL_ONGROUND;


    const bool is_frozen = g_cl.m_flags & FL_FROZEN;


    m_strafe_angles = m_cmd->m_view_angles;


    static float lastAirStopTime = 0.0f;


    float currentTime = g_csgo.m_globals->m_curtime;


    if (shouldAirStop && (currentTime - lastAirStopTime >= 0.3f)) {

        shouldAirStop = false;

    }


    if (!is_on_ground) {

        if (g_input.GetKeyState(g_menu.main.misc.instant_stop_in_air.get())) {

            g_aimbot.m_stop_air = true;

        }



        if (foundTarget && g_aimbot.isAtJumpApex()) {

            shouldAirStop = true;

            lastAirStopTime = currentTime;

        }


    }


// later reset it


    if (g_aimbot.m_stop_air || shouldAirStop) {


        const float vel_2d = g_cl.m_local->m_vecVelocity().length_2d();


        if (vel_2d > 10.f) {


            g_movement.NullVelocity();


        }


        else {


            g_cl.m_cmd->m_forward_move = g_cl.m_cmd->m_side_move = 0.f;


        }


    }



    if (is_on_ground || g_cl.m_weapon_fire || !foundTarget) {
[/REACT]

edit 25/9/1:
since i see this post is still getting attention i want to clarify that the scout isn't only accurate at the very peek where the velocity transitions
it's also accurate while you're de-accelrationg CLOSE to the apex
for example:
if vertical velocity decreasing and verticalVelocity < 20 it could still be accurate, this gives you more time to stop on servers with low sv_airaccelration
find a value that seuts you
 
Last edited:
youre right this is a pretty difficuilt feature to make, it took me almost 2 months to implement it becos i couldnt figure out the right velocity values per weapon and character model, good luck with it m8 and always believe in science :^)
 
youre right this is a pretty difficuilt feature to make, it took me almost 2 months to implement it becos i couldnt figure out the right velocity values per weapon and character model, good luck with it m8 and always believe in science :^)
vouch
 
youre right this is a pretty difficuilt feature to make, it took me almost 2 months to implement it becos i couldnt figure out the right velocity values per weapon and character model, good luck with it m8 and always believe in science :^)
2 months?? ok this gives me motivation
i've been going through the cycle of "yaay finally works, but strafe not working!!, or "yaay finally works but r@pes fps" and then some c++ errors i don't understand bcs im not femiliar with the language, the logic is there and it's correct, just needs cleaning
 
[REACT=1, 2, 4]updated jump apex/vertex detection (more consistent and preformant)[/REACT]
[REACT=1, 2, 4]updated target/shouldStop detection[/REACT]

make sure to reset foundTarget on the round start event otherwise you wont be able to move unless your esp sees a new enemy

in client.cpp:

[REACT=1, 2, 4][/REACT]
 
high asf atm but lmk if this is good or trash


boss apex jump geolocator:
Expand Collapse Copy
// call per frame
void boss_jump_apex()
{
    int current_y = abs(local_player.pos.y);
    static int last_y = 0;
    static bool check_for_apex = false;

    if (bJumped)
    {
        last_y = current_y;
        check_for_apex = true;
        return;
    }

    if (!check_for_apex)
        return

    if (current_y > last_y)
    {
        last_y = current_y;
        return;
    }
    else
    {
        check_for_apex = false;

        // apex
        // ...
    }
}
 
high asf atm but lmk if this is good or trash


boss apex jump geolocator:
Expand Collapse Copy
// call per frame
void boss_jump_apex()
{
    int current_y = abs(local_player.pos.y);
    static int last_y = 0;
    static bool check_for_apex = false;

    if (bJumped)
    {
        last_y = current_y;
        check_for_apex = true;
        return;
    }

    if (!check_for_apex)
        return

    if (current_y > last_y)
    {
        last_y = current_y;
        return;
    }
    else
    {
        check_for_apex = false;

        // apex
        // ...
    }
}
in csgo the vertical axis is actually Z not y
also i don't understand the logic? youre using position not velocity which means you'd have to get the original pos and compare height
 
[REACT=1, 2, 4]
jump apex detected:
Expand Collapse Copy
bool Aimbot::isAtJumpApex() {



    if (!g_cl.m_local || !g_cl.m_local->alive()) {


        return false;


    }



    if ((g_cl.m_flags & FL_ONGROUND) && g_cl.m_local->m_fFlags() & FL_ONGROUND) {


        return false;


    }


    static bool apexDetected = false;


    static float lastApexTime = 0.0f;



    float currentTime = g_csgo.m_globals->m_curtime;



    // keep apex true for 0.1 seconds after we've detected it


    if (apexDetected && (currentTime - lastApexTime < 0.1)) {


        return true;


    }



    if (currentTime - lastApexTime >= 0.1f) {


        apexDetected = false;


    }



    // don't calculate every frame to avoid fps drops


    static float lastCheckTime = 0.0f;


    if (currentTime - lastCheckTime < 0.05f) {


        return apexDetected;


    }


    lastCheckTime = currentTime;



    vec3_t abs_velocity = g_cl.m_local->m_vecAbsVelocity();


    float vertical_velocity = abs_velocity.z;



    // If vertical velocity crosses 0 (and in the air), detect apex


    if ((prevVerticalVelocity > 0 && vertical_velocity <= 0) || vertical_velocity == 0) {


        lastApexTime = currentTime;


        apexDetected = true;


    }



    prevVerticalVelocity = vertical_velocity;


    return apexDetected;


}
[/REACT]
fixed code not showing lol
[REACT=1, 2, 4]
in aimbot.find():
Expand Collapse Copy
    const bool ground = (combinedFlags & FL_ONGROUND);

    const bool inAir = !ground;


    const bool found_target = best.player && best.record;

    const bool high_damage = found_target && best.damage >= 100;


    if (high_damage) {

        if (inAir) {

            shouldAirStop = isAtJumpApex();

            if (shouldAirStop) {

                foundTarget = true;

                g_notify.add(XOR("Jumpscout initiated...\n"), Color(50, 255, 50, 255));

            }

        }

        else {

            foundTarget = true;

        }

    }

    else {

        foundTarget = shouldAirStop = false;

    }


    if ((ground && g_menu.main.aimbot.quick_stop.get() && found_target) ||

        (m_found_hit && (g_cl.m_weapon_fire || (g_menu.main.aimbot.quick_stop_mode.get(1) && g_cl.m_player_fire)))) {

        m_stop = true;

    }
[/REACT]

[REACT=1, 2, 4]
in client.cpp:
Expand Collapse Copy
void Client::DoMove() {



    const bool is_on_ground = m_flags & FL_ONGROUND;


    const bool is_frozen = g_cl.m_flags & FL_FROZEN;


    m_strafe_angles = m_cmd->m_view_angles;


    static float lastAirStopTime = 0.0f;


    float currentTime = g_csgo.m_globals->m_curtime;


    if (shouldAirStop && (currentTime - lastAirStopTime >= 0.3f)) {

        shouldAirStop = false;

    }


    if (!is_on_ground) {

        if (g_input.GetKeyState(g_menu.main.misc.instant_stop_in_air.get())) {

            g_aimbot.m_stop_air = true;

        }



        if (foundTarget && g_aimbot.isAtJumpApex()) {

            shouldAirStop = true;

            lastAirStopTime = currentTime;

        }


    }


// later reset it


    if (g_aimbot.m_stop_air || shouldAirStop) {


        const float vel_2d = g_cl.m_local->m_vecVelocity().length_2d();


        if (vel_2d > 10.f) {


            g_movement.NullVelocity();


        }


        else {


            g_cl.m_cmd->m_forward_move = g_cl.m_cmd->m_side_move = 0.f;


        }


    }



    if (is_on_ground || g_cl.m_weapon_fire || !foundTarget) {


        g_aimbot.m_stop_air = false;


        shouldAirStop = false;


    }
[/REACT]

make sure to return; early in strafe if shouldAIrStop is true, to debug you should add indicators, its much better than console
also reset foundTarget on round start
this is the first c++ code i've written, its not great but it works, not as good as i hoped but it works

protip: make something in your CheckHitChance method to devide the air hitchance by 2 or any factor when we are at apex, to avoid having to go low enough in air hitchance that cheat just no spreads and also avoiding cheat not shooting
 
Last edited:
I doubt that's the first time you coded in c++ or ever touched a source (game engine) game, or even first time you ever saw supremacy in your life, it's pretty solid for someone that never ever touched c++ or touched source engine
 
I doubt that's the first time you coded in c++ or ever touched a source (game engine) game, or even first time you ever saw supremacy in your life, it's pretty solid for someone that never ever touched c++ or touched source engine
it is lol, i did read alot of code before but thats basically the first time i wrote c++, i don't even know how to do hello world
thank you
 
i reacted but it doesnt show me the src idk
yeah my bad first time making a post
that's the correct message with the code
 

Who has read this thread (Total: 0) in last 1 hours View details