Results 1 to 12 of 12
  1. #1
    kashmir33's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    0
    My Mood
    Confused

    Exclamation [Help]VB Trainer

    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!

  2. #2
    Skinnlaw's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Netherlands
    Posts
    204
    Reputation
    -1
    Thanks
    15
    My Mood
    Amazed
    Use the search button I bet you will findt good trainer tuts...

  3. #3
    kashmir33's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    0
    My Mood
    Confused
    Quote Originally Posted by Skinnlaw View Post
    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

  4. #4
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    Quote Originally Posted by kashmir33 View Post
    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
    Code:
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        WriteMemory(game, address, value, bytes)
    End Sub

  5. #5
    kashmir33's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    0
    My Mood
    Confused
    Quote Originally Posted by 3Li0 View Post


    Code:
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        WriteMemory(game, address, value, bytes)
    End Sub
    ok thanks but it says name writememory not declared. Do I need a different module for that?

  6. #6
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    Quote Originally Posted by kashmir33 View Post
    ok thanks but it says name writememory not declared. Do I need a different module for that?
    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

  7. The Following 2 Users Say Thank You to ♪~ ᕕ(ᐛ)ᕗ For This Useful Post:

    kashmir33 (03-10-2011),Lyoto Machida (03-10-2011)

  8. #7
    kashmir33's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    0
    My Mood
    Confused

    Thumbs up

    Quote Originally Posted by 3Li0 View Post


    no dude, you would need a function to write the memory...here you go:
    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.

  9. #8
    lolbie's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Netherlands
    Posts
    5,207
    Reputation
    288
    Thanks
    2,136
    My Mood
    Angelic
    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

  10. #9
    kashmir33's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    0
    My Mood
    Confused
    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!!!

  11. #10
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    Quote Originally Posted by kashmir33 View Post
    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
    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...

  12. #11
    kashmir33's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    0
    My Mood
    Confused
    Quote Originally Posted by 3Li0 View Post


    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 -.-

  13. #12
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    Quote Originally Posted by kashmir33 View Post
    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:
    Code:
    Dim pProc As Process() = Process.GetProcessesByName(processName)
    This will get all the processes that have the same name with the specificed one, and put 'em on a array of processes.

    Code:
    For Each p In pProc
        'Code
    Next
    This will get all the processes catched and return them one by one....(It will take each element of the list)

    Code:
                    If p.ProcessName = processName Then
                        Dim hObject As IntPtr = OpenProcess(&H1F0FFF, 0, p.Id)
                        WriteProcessMemory(hObject, Address, Value, Bytes, Nothing)
                        CloseHandle(hObject)
                    End If
    Well, the 'If' is just to be sure that you are writing in the right process xD
    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..