JABhacksoul's GTA Trainer Tutorial
Tenpenny's bugs are driving me insane and I read a posting asking how this is done. Since I know how to make trainers I thought this would be a nice break to clear my head. Trainers manipulate the smallest parts of a game. Your score, wanted level or what type of car you have in a certain area. They are not able to make the major changes to the games as mods do.
You will need:
San Andreas Ultimate Editor - Available in the Download Section
Note: There is an ocx in this program that gives off a false virus warning. Set your anti-virus to ignore the file.
After installing all the programs, run TSearch it will look like this;
There are many tools here you won't always need or use, but you will need to understand that hexidecimal are numbers that use letters as values. We count 0 - 9 using the decimal system the computer counts 0 - 15 using the hex system and to replace the double digit numbers 10 - 15 it uses A - F so A = 10 and F = 15. So 10 hex = 16 decimal but there are converters in all these apps.
Start up GTA SA and then open the process here.
A listing showing all the processes your PC is running will appear. Choose GTA_SA.EXE and proceed to the search. I played my SA until I found a drug dealer and beat him up for his gun and money. My cash at this point is 2359 so this is the value I searched for and the program found 47 of this value inside the GTA memory.
So I played some more shot a drug dealer in the back of his head and picked up his money. ALT+TAB back to the TSearch. And ran the "Continue Search" with my new value 4365. This time the new value shows up 1 time. The location is B7CE54 hex or 12045908 decimal.
I will make a note of the location and test it. (I know this location is incorrect but this is to show you how to find out the hard way.) I test this location with the TSearch by entering a new value and jumping back into GTA SA to see if the money has changed. It went up but rapidly decreased back to the 4365 dollars? So the address is in error how? I did an 8 byte search and that is not large enough to hold that much money, so my address is about 4 bytes too high.
I changed the memory value to B7CE50 or 12045904 and punch in the new value and it holds. The little blue smilely will freeze the value in memory and it won't change. Well that was a bit of work to find an address so here is the easy way.
Running "San Andreas Ultimate Editor" I click on the |Code Editor| tab at the top. I click on the sub tab set |View Code Values| and then from the listing I expand Player--> Money--> Value and there is the decimal value we got from TSearch and I can use the convertor to get the hex value.
Running "Trainer Maker Kit" you will be prompted for a project name and then this will pop open. Looks hard but it is not. Press add button from the toolbar and add some buttons.
Add some text also on the same toolbar this will help identify things.
Add an edit box to put our value inside.
Expand text on the left and click go to properties.
In the properties box click on the function tab and choose poke then the value. The money is not a float it doesn't use decimal points. It is an unsigned long integer. The address value is B7CE50 also at this point go to the styles tab and change the default value to 0 or blank it out.
Next I change Button1 to the Exit Button like this;
Then I changed Button2 to my Help or Info Button. Save your project and make sure it is attached to the GTA_SA.EXE process. You can then test and/or build your trainer.
You can make your trainer very flashy with the Trainer Maker Kit. It has bitmap options and sounds etc...
But as you can tell my trainer worked just fine and looks like crap. In my opinion there are too many GTA trainers available so go make some for other games while you are at it.
Keep it cool,
Edited by JAB HacksouL, 10 July 2009 - 06:31 AM.