Solved C++ BHOP help.

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

lan909

Newbie
Jun 9, 2015
2
62
0
Hello all, so recently I got into coding, found some tutorials from fleep and decided I'd make a bhop cheat - for garry's mod, as there is a distinct lack of vac.

So far, everything works, I found the offsets with EASE, the bhop cheat itself works flawlessly, I'm just having one issue.
I can't seem to change it from being a toggle, I want to hold down space and jump to my hearts content, is anyone able to help me with this?

Oh, it also seems to have an issue if you crouch while it's active.
 
Last edited:

squeenie

Hacker
Meme Tier VIP
Dank Tier Donator
Mar 6, 2013
677
5,478
37
C++:
bool bhop = false;
if(GetAsyncKeyState(VK_SPACE))
{
    bhop = true;
}
else
{
    bhop = false
}

if(bhop == true)
{
    //bhop code here
}
 

lan909

Newbie
Jun 9, 2015
2
62
0
lack of source code = no help.
sorry, my bad.

C++:
#include <Windows.h>  
#include <iostream> 
#include "HackProcess.h"

CHackProcess fProcess;
using namespace std;

const DWORD Player_Base = 0x60CE28;
const DWORD dw_Jump = 0x690374;
const DWORD dw_JumpOffset = 0x350;


#define FL_ONGROUND 257
#define F6_Key 0x75
#define SPACE_BAR 0x20



bool b_True = true;
bool b_False = false;
bool BunnyHopStatus = false;

struct MyPlayer_t
{
	DWORD CLocalPlayer;
	int m_fFlags;
	void ReadInformation()
	{
		ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + Player_Base), &CLocalPlayer, sizeof(DWORD), 0);
		ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(CLocalPlayer + dw_JumpOffset), &m_fFlags, sizeof(int), NULL);
	}
}MyPlayer;


void BunnyHop()
{
	if (GetAsyncKeyState(SPACE_BAR))
	{
		BunnyHopStatus = !BunnyHopStatus;
		Sleep(250);
	}

	if (!BunnyHopStatus)
		return;

	if (MyPlayer.m_fFlags & 0x1 == 1)
	{
		WriteProcessMemory(fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + dw_Jump), &b_True, sizeof(bool), NULL);
	}
	else if (MyPlayer.m_fFlags != FL_ONGROUND)
	{
		WriteProcessMemory(fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + dw_Jump), &b_False, sizeof(bool), NULL);
	}
}


int main()
{
	fProcess.RunProcess();
	cout << "Garry's Mod found, enjoy bhopping." << endl;

	while (!GetAsyncKeyState(F6_Key))
	{
		MyPlayer.ReadInformation();
		BunnyHop();
	}

}
This code has the fix for not being able to jump while crouched, I was able to fix that.
I have next to no knowledge about C++, as I've come to it from coding in LUA. If you wonderful people could give me a hand, that'd be amazing.
 
Last edited:

misq

Newbie
Full Member
Aug 8, 2014
10
388
0
Um, why u use WriteProcessMemory? There is easier way to do BunnyHop hax...

C++:
void BunnyHop()
{
	if (GetAsyncKeyState(VK_SPACE))
	{
		if (MyPlayer.m_fFlags == 257)
		{
			keybd_event(MapVirtualKey(VK_SPACE, 0), 0x39, KEYEVENTF_EXTENDEDKEY, NULL);
			Sleep(3);
			keybd_event(MapVirtualKey(VK_SPACE, 0), 0x39, KEYEVENTF_EXTENDEDKEY|KEYEVENTF_KEYUP, NULL);
		}
	}

}
 

Obsta

Jr.Hacker
Meme Tier VIP
Jan 27, 2014
394
2,978
17
Um, why u use WriteProcessMemory? There is easier way to do BunnyHop hax...
Because Fleep's tutorials don't cover alternatives to this. Someone with no experience using send key events isn't going to consider it a option.
 

rN'

Jr.Hacker
Meme Tier VIP
Jan 19, 2014
340
5,268
41
C++:
bool bhop = false;
if(GetAsyncKeyState(VK_SPACE))
{
    bhop = true;
}
else
{
    bhop = false
}

if(bhop == true)
{
    //bhop code here
}
cmon rlly?
C++:
if( GetAsyncKeyState( VK_SPACE ) )
{

}
Also your else is useless because you initialize bunnyhop boolean as false^^

Um, why u use WriteProcessMemory? There is easier way to do BunnyHop hax...

C++:
void BunnyHop()
{
	if (GetAsyncKeyState(VK_SPACE))
	{
		if (MyPlayer.m_fFlags == 257)
		{
			keybd_event(MapVirtualKey(VK_SPACE, 0), 0x39, KEYEVENTF_EXTENDEDKEY, NULL);
			Sleep(3);
			keybd_event(MapVirtualKey(VK_SPACE, 0), 0x39, KEYEVENTF_EXTENDEDKEY|KEYEVENTF_KEYUP, NULL);
		}
	}

}
Please read m_fFlags as BYTE(char) because those are bit flags..
 

squeenie

Hacker
Meme Tier VIP
Dank Tier Donator
Mar 6, 2013
677
5,478
37
cmon rlly?
C++:
if( GetAsyncKeyState( VK_SPACE ) )
{

}
Also your else is useless because you initialize bunnyhop boolean as false^^


Please read m_fFlags as BYTE(char) because those are bit flags..
I know. I wrote it like that so he'd understand the logic.
 
Last edited:
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods