Use the search button I bet you will findt good trainer tuts...
Well im kind of desperate. Im a german student and this year i had to write a paper in my computer science class. i chose to write about hacks and trainers in pc games and wanted to code a little trainer myself for the game GTA San Andreas!
The problem is i was way to lazy and didnt start until about monday (tomorrow is due date ) I still dont have a working trainer and all i would need is something simple just to have something to write about in my main part of the paper.
Do you guys have any suggestions for some good tutorials on how to code a little trainer for changing the basic values for money, health etc. ? i googled like 5 hours every day this week but i couldnt find anything that would help me enough. I have the adresses that i need but just dont really know how to code a working trainer
I hope someone can help me with this i will be thankful forever!
Use the search button I bet you will findt good trainer tuts...
I did actually search already but i couldnt find anything quite fitting to my needs or im just stupid...
Here there is this tutorial.
So lets say I have found the adress for the money 00B7CE50 what code would i have to write to add 10k to the value. Im really sorry that i dont know to much about vb but i get the basic system. j
Code:Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click End Sub
no dude, you would need a function to write the memory...here you go:
Code:Private Declare Function WriteProcessMemory Lib "kernel32" Alias "WriteProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer Private Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer Private Declare Function CloseHandle Lib "kernel32" ( _ ByVal hObject As Integer) As Integer Public Declare Function OpenProcess Lib "kernel32" ( _ ByVal dwDesiredAccess As Integer, _ ByVal bInheritHandle As Integer, _ ByVal dwProcessId As Integer) As Integer Public Sub WriteMemory(ByVal processName As String, ByVal Address As Integer, ByVal Value As ULong, ByVal Bytes As Integer) Dim pProcess As Process() = Process.GetProcessesByName(processName) If Not pProcess.Length = 0 Then For Each p In pProcess If p.ProcessName = processName Then Dim hObject As IntPtr = OpenProcess(&H1F0FFF, 0, p.Id) WriteProcessMemory(hObject, Address, Value, Bytes, Nothing) CloseHandle(hObject) End If Next Else MsgBox("Please open " & processName & " before trying to write in.", MsgBoxStyle.Information, "Process not found!") End If End Sub
kashmir33 (03-10-2011),Lyoto Machida (03-10-2011)
thanks a lot! works great.
now i just need to kinda figure out what those lines actually mean + do because i still need to explain how this works...
Did you write this function on your own or can you find those by searching good enough. I would write that it is a complex function that you cant code with beginners knowledge and that one can find them on the internet. But for getting a good grade it would still be necessary that i explain the basics of this function...
well now that i tried the same thing for the health bar (address has a float value) it just decreases the health to 1 (or maybe even lower) so i die with one hit. What function would i have to use to freeze the value? wow i never would have thought it was that difficult to do -.- fml
Last edited by kashmir33; 03-10-2011 at 12:17 PM.
it's easy
put the cheat on a timer
so it refreshes your health the whole time
but i used an a lot better/easier module :O
I love it when people keep their agreements /sarcasm ftw
would you mind sharing it with me or post a link or something to it? btw i dont use the one that i posted above because it showed error messages
how would i put the cheat on a time? im so sorry that im asking those stupid questions but im really desperate.
oh and another question. the function i used from 3lio sets the value to what i want it to be. is there also a way to add something to the already existing value?
I really appreciate all you help! your saving my ass right now!!!
well, if it's a float value then idk how to help you...I asked for some help with floats on the C++ section . You can freeze it by typing this cheat:
cainemvhzc
xD I play GTA San Andreas too
BTW yes, the function is pretty much mine
But it's really long to explain what the lines do...If you have MSN maybe tomorrow...
lol ok of course i can use the cheats of the game but that wouldnt help me writing my paper about trainers xD
hmmm tomorrow will probably be to late. (I have to turn the paper in during school tomorrow) but i do have msn...
dont you maybe have a super basic explanation? If not than thanks anyways -.-
sorry no.
Anyways here is the explain:
This will get all the processes that have the same name with the specificed one, and put 'em on a array of processes.Code:Dim pProc As Process() = Process.GetProcessesByName(processName)
This will get all the processes catched and return them one by one....(It will take each element of the list)Code:For Each p In pProc 'Code Next
Well, the 'If' is just to be sure that you are writing in the right process xDCode:If p.ProcessName = processName Then Dim hObject As IntPtr = OpenProcess(&H1F0FFF, 0, p.Id) WriteProcessMemory(hObject, Address, Value, Bytes, Nothing) CloseHandle(hObject) End If
hObject - The current process handle returned by the function 'OpenProcess'
Now using our WriteProcessMemory imported from kernel32.dll, we can write into the game or any other process.
CloseHandle - Closes the current opened process..