Results 1 to 2 of 2
  1. #1
    zhaoyun333's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    396
    Reputation
    11
    Thanks
    1,125

    How to make a Multiplayer Trainer

    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
    Last edited by zhaoyun333; 04-18-2009 at 04:49 AM.
    There are five possible operations for any army. If you can fight, fight; if you cannot fight, defend; if you cannot defend, flee; if you cannot flee, surrender; if you cannot surrender, die." - Sima Yi

  2. #2
    Toymaker's Avatar
    Join Date
    Feb 2008
    Gender
    male
    Location
    Hannah, Montana
    Posts
    659
    Reputation
    14
    Thanks
    193
    My Mood
    Amused
    I also cover this but more detailed in my '[Tutorial] Gamehacking 101' thread. This is an overly repetitive thread and if you just pasted that code it's probably best if people have questions they ask me in my thread instead for accurate answers. Thanks though.

Similar Threads

  1. [Request] How To Make A Multiplayer Trainer
    By booterphhp in forum General Game Hacking
    Replies: 1
    Last Post: 10-25-2011, 03:17 AM
  2. How to make a multiplayer trainer
    By JAA149 in forum Programming Tutorial Requests
    Replies: 1
    Last Post: 04-16-2009, 01:21 PM
  3. [tut]How To Make A Flash Trainer[tut]
    By Slippy77 in forum Programming Tutorials
    Replies: 4
    Last Post: 12-31-2008, 01:33 PM
  4. How to make trainers
    By meowquack in forum WarRock - International Hacks
    Replies: 4
    Last Post: 04-16-2007, 09:49 AM
  5. How to make UCE making trainers?
    By ziom2322 in forum WarRock - International Hacks
    Replies: 12
    Last Post: 04-11-2007, 07:14 PM

Tags for this Thread