Bunny Hop Coding Help!

Posts 1–5 of 5 · Page 1 of 1
Bunny Hop Coding Help!
Hello, I was following Fleep's video on how to make a bunny hop hack for CS:GO. I have no errors but when I launch the .exe file its blank :/

Any chance someone help me? Also, I am using his HackProcess.h and its not modified but some people were commenting down saying something related to CS:GO it will work if you modify..

Code:
#include <Windows.h>
#include <iostream>
#include "HackProcess.h"

CHackProcess fProcess; 
using namespace std; 

const DWORD Player_Base = 0xA6C90C;

const DWORD healthOffset = 0xFC;
const DWORD dw_JumpOffsets = 0x100;

#define FL_ONGROUND 257
#define SPACE_BAR 0x20

#define F6_Key 0x75

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_JumpOffsets), &m_fFlags, sizeof(int), 0);
	
	}


}MyPlayer;




void BunnyHop()
{



	if (GetAsyncKeyState(SPACE_BAR))
	{
		bunnyHopStatus = !bunnyHopStatus;
		Sleep(250);

	}

	if (!bunnyHopStatus)
		return; 


	if (MyPlayer.m_fFlags == FL_ONGROUND) {
		WriteProcessMemory(fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + dw_JumpOffsets), &b_true, sizeof(bool), NULL);
	}

	else if (MyPlayer.m_fFlags == FL_ONGROUND) {
	
		WriteProcessMemory(fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + dw_JumpOffsets), &b_false, sizeof(bool), NULL);
	
	}




}








int main() {

	fProcess.RunProcess();
	cout << "Proccess Found, Running Bunny Hop Client!" << endl;

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

	}


}
That's how the console looks like :/




UPDATED ----------------------------------------------------------------------
Now the console is showing that its found. However, its not working, when I press space it only jumps once... :/


m_fFlags is a bit mask.
use m_fFlags & 1 == 1 to check if the player is on the ground.

and remove this
Code:
if (MyPlayer.m_fFlags == FL_ONGROUND) {
		WriteProcessMemory(fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + dw_JumpOffsets), &b_true, sizeof(bool), NULL);
	}

	else if (MyPlayer.m_fFlags == FL_ONGROUND) {
	
		WriteProcessMemory(fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + dw_JumpOffsets), &b_false, sizeof(bool), NULL);
You want to check if the player is on the ground and then press spacebar (or write 5 (+jump) then sleep for a few milliseconds and write 4 (-jump) to client.dll + 0x4A9D9D8).
Currently you are writing to the flags.

Check your code and you will see dw_JumpOffsets is equal to the m_fFlags offset and not to the actual jump command.
Just to clarify, I have no idea on how to do that :/ I mean your most properly wondering why you even trying but I wanted to do it. Also Merccy any chance you can make it sound more sense for someone like me? Beginner level :d thanks for the effort to comment and try to help me out bro.. :*
Quote Originally Posted by bulentERH View Post
Just to clarify, I have no idea on how to do that :/ I mean your most properly wondering why you even trying but I wanted to do it. Also Merccy any chance you can make it sound more sense for someone like me? Beginner level :d thanks for the effort to comment and try to help me out bro.. :*
Even though you can get flags as an int, it's not what you want.
Different bits in the flag mean different things. You need to get the first bit, which is 1 when your character is on the ground.
You can do this with the code Merccy2 posted.

Instead of
Code:
if (MyPlayer.m_fFlags == FL_ONGROUND)
You should use something like
Code:
if ((MyPlayer.m_fFlags & 1) == 1)
As for why it's blank, it looks like it's getting stuck on fProcess.runProcess
I can't see your HackProcess.h file so I can't really tell you why it's hanging there.

Thanks :-)
Everything is sorted except the coding bit I guess.

I mean it finds the process cause I changed the HackProcess.h to match CS:GO and it does it fine.

I've changed the coding too but still no sign of bunny hoping :/

Code:
#include <Windows.h>
#include <iostream>
#include "HackProcess.h"

CHackProcess fProcess; 
using namespace std; 

const DWORD Player_Base = 0xA6C90C;

const DWORD healthOffset = 0xFC;
const DWORD dw_JumpOffsets = 0x100;

#define FL_ONGROUND 257
#define SPACE_BAR 0x20

#define F6_Key 0x75

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_JumpOffsets), &m_fFlags, sizeof(int), 0);
	
	}


}MyPlayer;




void BunnyHop()
{



	if (GetAsyncKeyState(SPACE_BAR))
	{
		bunnyHopStatus = !bunnyHopStatus;
		Sleep(250);

	}

	if (!bunnyHopStatus)
		return; 


	if ((MyPlayer.m_fFlags & 1) == 1) {
		WriteProcessMemory(fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + dw_JumpOffsets), &b_true, sizeof(bool), NULL);
	}

	else if ((MyPlayer.m_fFlags & 1) == 1) {
	
		WriteProcessMemory(fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + dw_JumpOffsets), &b_false, sizeof(bool), NULL);
	
	}




}








int main() {

	fProcess.RunProcess();
	cout << "Proccess Found, Running Bunny Hop Client!" << endl;

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

	}


}
Posts 1–5 of 5 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us