fleep hacks -_- make ur own tut bro
Hey MPGH
I want to show you guys how to make a trainer, BUT in c++ in a dll!
1. Find the pointers / addresses!
(Tutorial)
*Video Removed due to Link/Advertising*
So first you gonna do is open visual studio or visual c++.
Then you are going to make a project.(Win32 Project -> DLL -> Empty Project)
After that you done that you must create a new source file. I call it main.cpp(like everyone)...
Then you include windows.h
Thats the only include you need for a trainer for black ops 2...Code:#include <Windows.h>
Now you add the basic dll structure:
So... in black ops there are a secondary and a primary weapon... when you take another from the groundCode:BOOL WINAPI DllMain(HMODULE hDll, DWORD dwReason, LPVOID lpReserved) { if(dwReason == DLL_PROCESS_ATTACH) { // code here } return true; }
the values changing... so you must hold the value... you can do this by creating a thread with a unlimited loop(for(;)
or while(1). I'll use for(;...
So the actually code is:
Correct the addresses and then inject the dll with perx or whatever in your game(Black ops 2 single player)Code:#include <Windows.h> DWORD MyTutorialThread() // Our thread { HANDLE t6sp = GetCurrentProcess(); // gets the process, the dll is injected in... DWORD address1 = 0x0000000; // Must update the addresses xD DWORD address2 = 0x0000000; // Must update the addresses xD int value1 = 99999; // first value int value2 = 99999; // second value for(;;) // unlimited loop { WriteProcessMemory(t6sp, (LPVOID)address1, &value1, sizeof(DWORD), 0); // Writes in the memory WriteProcessMemory(t6sp, (LPVOID)address2, &value2, sizeof(DWORD), 0); // Writes in the memory } } BOOL WINAPI DllMain(HMODULE hDll, DWORD dwReason, LPVOID lpReserved) { if(dwReason == DLL_PROCESS_ATTACH) // if dll is injected { CreateThread(NULL, NULL,(LPTHREAD_START_ROUTINE)MyTutorialThread , NULL, NULL, NULL); // Creates the thread "MyTutorialThread" } return true; }
Credits:
Me(Coding & writing the tutorial -.-)
So have fun guys!
Last edited by Jorndel; 06-25-2013 at 04:20 PM.
▲
fleep hacks -_- make ur own tut bro
YOU ONLY LIVE ONCE
I think you should provide credits when needed.
Also, why are you using the API to write/read ?
Your creating an inject hack. Yet you don't write to the game directly
If I remember correctly all you have to do is:
(We set the value to '0' of the address we point to)Code:*(int*)0x00000 = 0;
Last edited by Jorndel; 06-25-2013 at 04:45 PM.
omg dont spam please
when you want a tutorial search for one -.-
---------- Post added at 05:57 AM ---------- Previous post was at 05:56 AM ----------
And why credits thats the basics of c++ ._.
---------- Post added at 05:58 AM ---------- Previous post was at 05:57 AM ----------
On Black Ops 2 single player?
When this works thanks
▲
Since you're doing a DLL, you can skip WriteProcessMemory as Jorndel said. You can directly use pointers.
Code:#define WIN32_LEAN_AND_MEAN //We don't need to import the full WinAPI for such a simple trainer #include <Windows.h> DWORD MyTutorialThread() // Our thread { // HANDLE t6sp = GetCurrentProcess(); // gets the process, the dll is injected in... - You don't need this. DWORD address1 = 0x0000000; // Must update the addresses xD DWORD address2 = 0x0000000; // Must update the addresses xD int value1 = 99999; // first value int value2 = 99999; // second value for(;;) // unlimited loop { *(int*)address1 = value1; //DWORD = unsigned long = int *(int*)address2 = value2; //Format: *(ValueType*)Address = value; Sleep(100); //Sleep as your thread will make the game lag or cause ALOT of CPU usage } } BOOL WINAPI DllMain(HMODULE hDll, DWORD dwReason, LPVOID lpReserved) { if(dwReason == DLL_PROCESS_ATTACH) // if dll is injected { CreateThread(NULL, NULL,(LPTHREAD_START_ROUTINE)MyTutorialThread , NULL, NULL, NULL); // Creates the thread "MyTutorialThread" } return true; }
Last edited by Kenshin13; 06-26-2013 at 10:48 PM.
Why putting an infinite loop if you're going to change one or two variables in-game? (like experience etc)
Give proper credit where it's due next time to Fleep Hacks. And he wasn't spamming, he was telling the truth. Nonetheless, nice tut.
MPGH HISTORY:
Registered Since 4-23-2013
Editor 09-04-2013 - unknown
Minion 10-22-2013 - 1-18-2014
Donator 12-31-2014 - present
Premium Seller 12-31-2016 - present
Minion 03-15-2017 - I forgot
So you mean EVERYONE learns from a single guy's tutorials? This is so basic credits aren't even required. If they are, you should credit the original C++ creator and Microsoft for API implementation.
Because some values may reset at the end of a game.
MPGH HISTORY:
Registered Since 4-23-2013
Editor 09-04-2013 - unknown
Minion 10-22-2013 - 1-18-2014
Donator 12-31-2014 - present
Premium Seller 12-31-2016 - present
Minion 03-15-2017 - I forgot
So why put a loop when it's going to end at some point and the values will get back as they were? What I'm trying to say is that if the value is changed only when the DLL is loaded then I guess hex editing will do the work and keep the value the same even if the DLL is injected or not.
The DLL will only unload if you manually do it. It will keep the values constant until you remove it (Unload) or close the game. Values change sometimes so if you do hex edit it, you'll need to do it over and over every time the value resets (As I've experienced them resetting every 5 minutes.) Hence an infinite loop.
So what you're saying makes no sense unless you see no problem hex editing every 5 minutes or so. This is why there's a loop.