Hue
Veteran
- Messages
- 20
- Reaction score
- 18
- Points
- 793
This is a tutorial on how to make a dll hack for BO2 or it could be transfered to any other PC game but you need the offsets.
Step 1:
Image
Create a new project in Visual Studio (You Can Use Any Visual Studio)
"File" > "New" > "Project"
Step 2:
Image
Click Visual C++ Then click Win32 Project and click "OK"
Step 3:
Image
Click "DLL" > "Empty Project" > "Finish"
Step 4:
Image
Right click "Source Files" > "Add" > "New Item"
Step 5:
Image
Then click C++ File and name it "main"
Step 6:
At the top put this
Step 7:
Hit enter and add this
Step 8:
At the bottom put this
Step 9:
Heres how to add a mod
bool Recxil = false;
BYTE RecoilOn[] = {0x75};
BYTE RecoilOff[] = {0x74};
if(GetAsyncKeyState(VK_F2))
{
if(Recxil == false)
{
Recxil = true;
WriteProcessMemory(Daddy,(void*)(0x5C6219), &RecoilOff, 1, 0);
}
else
{
WriteProcessMemory(Daddy,(void*)(0x5c6219), &RecoilOn, 1, 0);
Recxil = false;
}
}
Again you can change the "VK_F2" to your liking
Step 10:
Image
For this step all you do is click "Build" then "Rebuild Solution"
Step 11:
Image
The DLL should appear in the "Debug" folder, Now you just inject the dll while BO2 is running
How to inject the dll:
Lastly you click "Memory View" > "Tools" > "Inject DLL" and select the DLL
Step 1:
Image
"File" > "New" > "Project"
Step 2:
Image
Step 3:
Image
Step 4:
Image
Step 5:
Image
Step 6:
At the top put this
#include <windows.h>
#include <stdio.h>
#include <iostream>
#include <conio.h>
#include <string>
#include <fstream>
#include <float.h>
using namespace std;
#include <stdio.h>
#include <iostream>
#include <conio.h>
#include <string>
#include <fstream>
#include <float.h>
using namespace std;
Step 7:
Hit enter and add this
DWORD WINAPI LoopFunction( LPVOID lpParam )
{
HANDLE Daddy = GetCurrentProcess();
cout << "<Hues BO2 Dll Hack>" << endl;
cout << endl;
cout << "F1 = Cycle Camos" << endl;
cout << "F2 = Toggle Recoil" << endl;
cout << "F3 = Toggle FPS" << endl;
cout << "F11 = Close Console" << endl;
while(1)
{
if(GetAsyncKeyState(VK_F11))
{
FreeConsole();
}
Sleep(1000);
return 0;
}
For the "if(GetAsyncKeyState(VK_F11))" you can change the "VK_F11" to any key
{
HANDLE Daddy = GetCurrentProcess();
cout << "<Hues BO2 Dll Hack>" << endl;
cout << endl;
cout << "F1 = Cycle Camos" << endl;
cout << "F2 = Toggle Recoil" << endl;
cout << "F3 = Toggle FPS" << endl;
cout << "F11 = Close Console" << endl;
while(1)
{
if(GetAsyncKeyState(VK_F11))
{
FreeConsole();
}
Sleep(1000);
return 0;
}
For the "if(GetAsyncKeyState(VK_F11))" you can change the "VK_F11" to any key
Step 8:
At the bottom put this
BOOL WINAPI DllMain (HINSTANCE hModule, DWORD dwAttached, LPVOID lpvReserved)
{
if (dwAttached == DLL_PROCESS_ATTACH)
{
CreateThread(NULL,0,&LoopFunction,NULL,0,NULL);
AllocConsole();
AttachConsole(ATTACH_PARENT_PROCESS);
system("Color A");
}
return 1;
}
{
if (dwAttached == DLL_PROCESS_ATTACH)
{
CreateThread(NULL,0,&LoopFunction,NULL,0,NULL);
AllocConsole();
AttachConsole(ATTACH_PARENT_PROCESS);
system("Color A");
}
return 1;
}
Step 9:
Heres how to add a mod
bool Recxil = false;
BYTE RecoilOn[] = {0x75};
BYTE RecoilOff[] = {0x74};
if(GetAsyncKeyState(VK_F2))
{
if(Recxil == false)
{
Recxil = true;
WriteProcessMemory(Daddy,(void*)(0x5C6219), &RecoilOff, 1, 0);
}
else
{
WriteProcessMemory(Daddy,(void*)(0x5c6219), &RecoilOn, 1, 0);
Recxil = false;
}
}
Again you can change the "VK_F2" to your liking
Step 10:
Image
Step 11:
Image
How to inject the dll: