-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFeatures.cpp
More file actions
46 lines (33 loc) · 1.23 KB
/
Features.cpp
File metadata and controls
46 lines (33 loc) · 1.23 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
#include "pch.h"
#include "Features.h"
#include "Memory.h"
#include "Menu.h"
std::random_device rd;
std::mt19937 gen(rd());
std::uniform_int_distribution<> distr(101, 999);
unsigned int INTMAX = INT_MAX;
int oldHealth = 100;
void Features::UnlimitedHP(unsigned int idx)
{
void* Health = (void*)Memory::FindDMAAddy(Memory::pHandle, Memory::BaseAddress + 0x10F4F4, { 0xF8 });
Memory::PatchEx(Memory::pHandle, Health, &INTMAX, sizeof(INTMAX));
while (Menu::toggled[idx] == true)
{
Memory::PatchEx(Memory::pHandle, Health, &INTMAX, sizeof(INTMAX));
Sleep(10);
}
Memory::PatchEx(Memory::pHandle, (void*)Health, &oldHealth, sizeof(oldHealth));
}
void Features::UnlimitedAmmo(unsigned int idx)
{
Memory::PatchEx(Memory::pHandle, (BYTE*)(Memory::BaseAddress + 0x637e9), (BYTE*)"\xFF\x06", 2);
while (Menu::toggled[idx] == true) {}
unsigned int mag = 20;
Memory::PatchEx(Memory::pHandle, (BYTE*)(Memory::BaseAddress + 0x637e9), (BYTE*)"\xFF\x0E", 2);
}
void Features::NoRecoil(unsigned int idx)
{
Memory::NopEx(Memory::pHandle, (BYTE*)(Memory::BaseAddress + 0x63786), 10);
while (Menu::toggled[idx] == true) {}
Memory::PatchEx(Memory::pHandle, (BYTE*)(Memory::BaseAddress + 0x63786), (BYTE*)"\x50\x8D\x4C\x24\x1c\x51\x8B\xCE\xFF\xD2", 10);
}