Since so many noobs are asking for one.
Noob Requirements:
Understanding of C++/C;
Understanding of Cheat Engine;
What noobs need:
A C++/C compiler (Ive seen so many noobs who take a c file and ask how to turn it to an exe)
Cheat Engine or a UCE (Undetected Cheat Engine)
A game
If you don't have any of the above, get it.
1. Start up your game
2. Start Up Cheat Engine
3. Open the process which runs your game
4. Depending on your game, if it has security, it will detect Cheat Engine. In this case, use a UCE. If you don't have one choose another game or stop reading.
5. Search for the value you want, eg: stamina, hp, ammo or w/e.
6. Add the value to your address list.
7. If the address is not randomly allocated and has a set address every time the game is run, then move to 8. You can find out if the address is set if you restart the game and the address is the same value, if it is a random value it is not set.
8. Copy the address.
9. Copy this code and follow the comments:
Code:
//zhaoyun333
//Code taken from l0ngcat: https://www.mpgh.net/forum/17-tutorials/7511-writing_your_own_c_trainer.html
#include <windows.h>
#include <conio.h>
#include <dos.h>
#include <tlhelp32.h>
#include <stdio.h>
int value; // will store value of address
bool dofreeze = false; // determines if user activated value freeze
LPVOID value_addr = (void*) 0x00933410; //take the address you copied and replace all the digits after 0x
void screen() // output
{
system("cls"); // clear the screen
printf("Hello World! This is my first mutliplayer trainer! nn");
if(dofreeze) printf("[1] - freeze [ENABLED]n"); // if user enabled freeze, let him know!
if(!dofreeze) printf("[1] - freeze [disabled]n"); // same if it's disabled
}
int main(int argc, char* argv[])
{
HANDLE hProcessSnap; // will store a snapshot of all processes
HANDLE hProcess = NULL; // we will use this one for the game process
PROCESSENTRY32 pe32; // stores basic info of a process, using this one to read the ProcessID from
hProcessSnap = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 ); // make process snapshot
pe32.dwSize = sizeof( PROCESSENTRY32 ); // correct size
Process32First(hProcessSnap, &pe32); // read info about the first process into pe32
do // loop to find the game process
{
if(strcmp(pe32.szExeFile, "****.exe") == 0) // replace **** with the process name of your game
{
hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pe32.th32ProcessID); // open it, assigning to the hProcess handle
break; // break the loop
}
}
while(Process32Next(hProcessSnap, &pe32)); // loop continued until Process32Next deliver NULL or its interrupted with the "break" above
CloseHandle( hProcessSnap ); // close the handle (just fuckin do it)
if(hProcess == NULL) // self explanatory tbh
{
printf("Game not foundnn");
getch(); // wait for a key press. otherwise the app will just close so fast when the process is not found, you wont know wtf happened.
}
else
{
screen(); // print the display
char key = ' '; // make a key variable to store pressed keys
while(key != VK_ESCAPE) // loop until user presses Escape
{
if(kbhit()) // if a key was pressed
{
key = getch(); // it is saved into "key"
switch(key) // here the commands are handled depending on the key that was pressed
{ // case '1': ... break; case '2': ... break; and so on
case '1':
dofreeze = !dofreeze; // flip the dofreeze value true<->false to enable/disable it
ReadProcessMemory(hProcess,value_addr,&value,4,NULL); //Read address and put value to value
break;
case '2':
shootf = !shootf;
break;
}
screen(); // print the display after each key press
}
if(doammo){ // if barret freeze is activated
WriteProcessMemory(hProcess, value_addr, &value, 4, NULL);}
}
CloseHandle(hProcess); // close the handle
}
return 0; // THE END
}
Save it as trainer.cpp
9. Compile it with a C++/C compiler
10. Run it
11. It should freeze the value of an address