-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHacks.cpp
More file actions
55 lines (49 loc) · 1.03 KB
/
Hacks.cpp
File metadata and controls
55 lines (49 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include "Hacks.h"
Process pro;
DWORD cHacks::proc = NULL,
cHacks::client = NULL;
bool cHacks::isRunning = false;
struct Signatures
{
const DWORD dwForceJump = 0x74AA48;
const DWORD is_inAir = 0x6D6EE0;
}Sig;
void cHacks::Start()
{
Prepare();
while (true)
{
Bunnyhop();
Sleep(10);
}
}
bool cHacks::Prepare()
{
while (!proc && !client)
{
proc = pro.getProcess("left4dead2.exe");
client = pro.getModule(proc,"client.dll");
cout << "Waiting for L4D2 process !!!\n";
Sleep(500);
}
system("cls");
return true;
}
void cHacks::Bunnyhop()
{
while (true) {
cout << "F1 - Toggle Bunnyhop !!!\n";
if (GetAsyncKeyState(VK_F1) & 1) { isRunning = !isRunning; Beep(1000, 800); }
if (isRunning) {
if (GetAsyncKeyState(VK_SPACE) < 0) {
int inAir = pro.readMem<int>(client + Sig.is_inAir);
if (inAir == 0) {
pro.writeMem<int>(client + Sig.dwForceJump, 5);
Sleep(20);
pro.writeMem<int>(client + Sig.dwForceJump, 4);
}
}
}
Sleep(1);
}
}