BHOP

Posts 1–4 of 4 · Page 1 of 1
BHOP
Hey, what is my failure?

Code:
const DWORD flagOffset = 0x100;

ProcMem mem; // ProcMem Object

// KEYS
#define space_bar 0x20
#define KEY9 0x39
#define KEY9SC 0x0A

void bhop(DWORD clientDLL)
{
	int FL_ONGROUND = 257;
	int LocalBase = mem.Read<DWORD>(clientDLL + LocalPlayer);
	DWORD localPlayer = mem.Read<DWORD>(clientDLL + LocalBase);
	int m_fFlags = mem.Read<DWORD>(localPlayer + flagOffset); 

	if (GetAsyncKeyState(space_bar) & 0x8000 && m_fFlags == FL_ONGROUND)
	{ 
		keybd_event(KEY9, KEY9SC, 0, 0); 
		keybd_event(KEY9, KEY9SC, KEYEVENTF_KEYUP, 0); 
	}
}
Code:
int main()
{
	SetConsoleTitle("TEST");
	mem.Process("csgo.exe");

	while (true)
	{
		DWORD clientDLL = mem.Module("client.dll");
		DWORD localPlayer = mem.Read<DWORD>(clientDLL + LocalPlayer);
		int localTeam = mem.Read<int>(localPlayer + m_iTeamNum);

		bhop(clientDLL);

		Sleep(1);
	}
}
Maybe you must paste in the console: bind 9 "+jump"
State what is going wrong?

Not jumping at all, crashes after a few jumps?
I'd recommend using WPM, set +jump then -jump but that's my personal preference.
Also a small sleep between key down and key up is a smart idea. Otherwise it may not work properly.
This is working for me.
I commented some stuff and changed some of the code.
Hope it helps:
 
The code

Code:
#include "ProcMem.h"
#include <iostream>
#include <Windows.h>
#include <string>

const DWORD flagOffset = 0x100;
const DWORD EntityList = 0x04A13264;
const DWORD playerBase = 0x00A7094C;
const DWORD m_iTeamNum = 0xF0;

ProcMem mem; // ProcMem Object

void bhop();

// KEYS
#define space_bar 0x20
#define KEY9 0x39
#define KEY9SC 0x0A

struct read_t { // Made a struct instead, they're easy to make and very usefull.
	DWORD clientDLL, localPlayer;
	int m_fFlags;

	void readInfo() {
       mem.Process("csgo.exe"); // Process name.
	   clientDLL = mem.Module("client.dll");
	   localPlayer = mem.Read<DWORD>(clientDLL + playerBase);
	   m_fFlags = mem.Read<int>(localPlayer + flagOffset);
	}
}read; // we can do read.readInfo() and we can access all of our calculations! :)


int main()
{
	SetConsoleTitle("TEST");
	//mem.Process("csgo.exe"); Same here
	while (true)
	{
		//DWORD clientDLL = mem.Module("client.dll"); Same here.
		//DWORD localPlayer = mem.Read<DWORD>(clientDLL + LocalPlayer); Put theese in a struct.
		//int localTeam = mem.Read<int>(localPlayer + m_iTeamNum); Same here

		bhop(&callOnce); // We pass bhop func the address of callOnce

		Sleep(1);
	}
}

void bhop() 
{
		read.readInfo(); // We're gonna be using calculations from our readInfo function, so to access that function, we call our read struct, we tell it we're gonna be using readInfo.


	if (GetAsyncKeyState(space_bar) & 0x8000 && read.m_fFlags & 0x1 == 1) // We change it to 0x1 == 1 because its a bitmasked value. Basically allows us to bhop while crouched.
	// We also needed to put read. infront of our m_fFlags, thats because if we want access to it, we need to take it from our struct, by doing read.
	{ 
		keybd_event(KEY9, KEY9SC, 0, 0); 
		Sleep(5); // Add sleep here, otherwise it wont work.
		keybd_event(KEY9, KEY9SC, KEYEVENTF_KEYUP, 0); 
	}
}
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us