How to code your own Bunny Hop

01/05/2015 08:21 Requi#1
Hey guys, I just wanted to share with you how to code your own bhop.

Here will be only pseudo-code and logical stuff. No copy&pasterino feeding for newbs.

A bhop "hack" is the easiest thing you can code.

1. Check if user is pressing space in a while loop.

Code:
while (true)
if(userIsPressingSpace()) {
//later on
}
2. Check per memory if user is on ground or in air.
We need 2 offsets for that. One changes after a game update. One doesn't. And we need the ModuleBaseAdress of the client.dll.
LocalPlayerBase and m_fFlag.

You have to get them by yourself. I won't share them.

So now:
Code:
UInt clientDll = GetModuleBaseAdress(processhandle, "client.dll")
while(true)
if(userIsPressingSpace()) {
uint localPlayer = MemRead(processhandle, clientDll + LocalPlayerBase)
//now we have our local player.
uint m_fFlag = MemRead(processhandle, localPlayer + m_fFlagOffset)
}
now that we have our values, we just need to check if they are, what we want.
in our case on ground would be 257. In air would be 256 afaik.

so we just check for 257.

Code:
UInt clientDll = GetModuleBaseAdress(processhandle, "client.dll")
Int FL_ONGROUND = 257
while(true)
if(userIsPressingSpace()) {
uint localPlayer = MemRead(processhandle, clientDll + LocalPlayerBase)
//now we have our local player.
uint m_fFlag = MemRead(processhandle, localPlayer + m_fFlagOffset)
if(m_fFlag == FL_ONGROUND)
{
//send a space up the the csgo window
//send a space down to the csgo window
// SendMessage *cough*
}
}
Copying this code and paste it in some project will not help. It won't work like this at all. Like I told you, it's just Pseudo-Code (Pseudocode - Wikipedia, the free encyclopedia)

If you dont want to jump ingame, if you're just writing somebody, you have to check if the current ForegroundWindow = the csgo window. How to do that, is your job :p

I hope you like this little, but easy tutorial and I hope you understood me :D
And thanks to [Only registered and activated users can see links. Click Here To Register...]

Good Luck coding your own perfect bhop.
01/05/2015 13:50 cяαzуℓυмι#2
Code:
bool checkState(int state)
        {
            if (state == 256) return false;
            else if (state == 258) return false;
            else if (state == 260) return false;
            else if (state == 262) return false;
            else return true;
        }
if returns true -> jump
01/06/2015 13:08 AresZs#3
Why are you using?
Code:
int FL_ONGROUND == 257
the flag for on ground u can do with
Code:
localPlayer.m_fFlags & (1<<0)
257 is only for staying on ground, if you crouch, u can't even jump normal.