PostButton problem...

Posts 1–6 of 6 · Page 1 of 1
Button problem...
Hi, sorry for posting so many threads about me needing help....

But im still working on my Trainer (My first one) the help that i need for this one is that when i want to click on a button for an example i want to click on "Unlock all titles" i want it to activate the hack.

But, when i don't know the code for it... well i don't know how to do it lol :P I know how to do it with the "Combobox" but not with a regular button.... (I know that's very stupid)

Here is the code so you guys can help me were to put it. BTW Button number 5 is the TITLES :P

Code:
Public Class Form1

    Dim MW3 As New Mw3_Trainer

    Private Property Backimg As Color

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        MW3.Hack("iw5mp")
        MW3.SetInt(&H1DC04C8, ComboBox2.Text)
    End Sub


    Private MyList As Integer() = {0, 800, 1900, 3100, 4900, 7100, 9600, 12400, 15600, 19200, 23100, 27500, 32400, 37800, 43700, 50100, 57000, 64400, 72300, 80700, 89600, 99000, 108900, 119300, 130200, 141600, 153500, 165900, 178800, 192200, 206200, 220800, 236000, 251800, 268200, 285200, 302800, 321000, 339800, 359200, 379200, 399800, 421000, 442800, 465200, 488200, 511800, 536000, 560800, 586200, 612350, 639250, 666900, 695300, 724450, 754350, 785000, 816400, 848550, 881450, 915100, 949500, 984650, 1020550, 1057200, 1094600, 1132750, 1171650, 1211300, 1251700, 1292850, 1334500, 1377150, 1420300, 1464450, 1509100, 1554750, 1600900, 1648050, 1746200}
    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        MW3.Hack("iw5mp")
        MW3.SetInt(&H1DC02B8, MyList(ComboBox1.SelectedIndex))
    End Sub


    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
        MW3.Hack("iw5mp")
        MW3.SetInt(&H1DC2327, ComboBox3.Text)

    End Sub
    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
        If Label1.Location.X + Label1.Width < 0.0 Then
            Label1.Location = New Point(Me.Width, Label1.Location.Y)
        Else
            Label1.Location = New Point(Label1.Location.X - 3, Label1.Location.Y)
        End If
    End Sub

    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        MW3.Hack("iw5mp")
        MW3.SetInt(&H1DC232F, ComboBox4.Text)

    End Sub

    Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
        MW3.Hack("iw5mp")
        MW3.SetInt(&H1DC216C, )
    End Sub
End Class
My offer still stands ...

Add me (if you need faster help):
Steam (ID): Paravaria
Skype (Account-Name): Schokobanana16

----------------------------------------

You need Bytes to bring "All Emblems & Titles" to work.

Look here:
Code:
    Dim All_Emblems_Offset As Integer = &H1DC20EC
    Dim All_Titles_Offset As Integer = &H1DC216C
Code:
Dim All_Emblems_And_Titles_Bytes As Byte() = {&HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF}
If you only want to Unlock the Titles, then let the first "MW3.SetByte..." away.
Code:
Private Sub All_Emblems_And_Titles_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles All_Emblems_And_Titles.Click
            If PH.Process_Handle("iw5mp") Then
                MW3.SetByte(All_Emblems_Offset, All_Emblems_And_Titles_Bytes)
                MW3.SetByte(All_Titles_Offset, All_Emblems_And_Titles_Bytes)
            Else
                MsgBox("Game is not running!", , "Warning!")
            End If
    End Sub
PH is the Process Handle-Class from Jorndel.
It's checked if the Game is running, if yes, then it Hacks "All Emblems + Titles" and if not, then it comes a MessageBox with the Text "Game is not running!" and as Title of the MessageBox "Warning!".

Process Handle-Class by Jorndel (Released on MPGH)
Code:
Imports System.Runtime.InteropServices
Imports System.Text
Public Class MemoryClass1
#Region "Basic Stuff"
    <DllImport("kernel32.dll")> _
    Private Shared Function ReadProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <[In](), Out()> ByVal buffer As Byte(), ByVal size As UInt32, ByRef lpNumberOfBytesWritten As IntPtr) As Int32
    End Function
    <DllImport("kernel32.dll")> _
    Private Shared Function WriteProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <[In](), Out()> ByVal buffer As Byte(), ByVal size As UInt32, ByRef lpNumberOfBytesWritten As IntPtr) As Int32
    End Function
    <DllImport("user32.dll", CharSet:=CharSet.Auto, ExactSpelling:=True)> _
    Public Shared Function GetKeyState(ByVal virtualKeyCode As Keys) As Short
    End Function
    Private pHandel As IntPtr
    Public Function Process_Handle(ByVal ProcessName As String) As Boolean
        Try
            Dim ProcList As Process() = Process.GetProcessesByName(ProcessName)
            If ProcList.Length = 0 Then
                Return False
            Else
                pHandel = ProcList(0).Handle
                Return True
            End If
        Catch ex As Exception
            Console.Beep()
            Console.WriteLine("Process_Handle - " + ex.Message)
            Return False
        End Try
    End Function
    Private Function Read(ByVal Address As Integer, ByVal Length As Integer) As Byte()
        Dim Buffer As Byte() = New Byte(Length - 1) {}
        Dim Zero As IntPtr = IntPtr.Zero
        ReadProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
        Return Buffer
    End Function
    Private Sub Write(ByVal Address As Integer, ByVal Value As Integer)
        Dim Buffer As Byte() = BitConverter.GetBytes(Value)
        Dim Zero As IntPtr = IntPtr.Zero
        WriteProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
    End Sub
#End Region
#Region "Write Functions (Integer & String)"
    Public Sub WriteInteger(ByVal Address As Integer, ByVal Value As Integer)
        Write(Address, Value)
    End Sub
    Public Sub WriteString(ByVal Address As Integer, ByVal Text As String)
        Dim Buffer As Byte() = New ASCIIEncoding().GetBytes(Text)
        Dim Zero As IntPtr = IntPtr.Zero
        WriteProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
    End Sub
    Public Sub WriteBytes(ByVal Address As Integer, ByVal Bytes As Byte())
        Dim Zero As IntPtr = IntPtr.Zero
        WriteProcessMemory(pHandel, New IntPtr(Address), Bytes, CUInt(Bytes.Length), Zero)
    End Sub
    Public Sub WriteNOP(ByVal Address As Integer)
        Dim Buffer As Byte() = New Byte() {&H90, &H90, &H90, &H90, &H90}
        Dim Zero As IntPtr = IntPtr.Zero
        WriteProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
    End Sub
#End Region
#Region "Read Functions (Integer & String)"
    Public Function ReadInteger(ByVal Address As Integer, Optional ByVal Length As Integer = 4) As Integer
        Return BitConverter.ToInt32(Read(Address, Length), 0)
    End Function
    Public Function ReadString(ByVal Address As Integer, Optional ByVal Length As Integer = 4) As String
        Return New ASCIIEncoding().GetString(Read(Address, Length))
    End Function
    Public Function ReadBytes(ByVal Address As Integer, ByVal Length As Integer) As Byte()
        Return Read(Address, Length)
    End Function
#End Region
#Region "Extra"
    Public Function HotKey(ByVal Key As Keys) As Boolean
        Return Convert.ToBoolean(GetKeyState(Key))
    End Function
    Private Check_res As Boolean = True
    Public Function Check_Value(ByVal Value As String) As Integer
        For Each a As Char In Value
            If Char.IsNumber(a, 0) Then
                Check_res = True
            Else
                Check_res = False
                Return 0
                Exit For
            End If
        Next
        Return Convert.ToInt32(Value)
    End Function
#End Region
End Class
Quote Originally Posted by MW3HackzZ4PC View Post
My offer still stands ...

Add me (if you need faster help):
Steam (ID): Paravaria
Skype (Account-Name): Schokobanana16

----------------------------------------

You need Bytes to bring "All Emblems & Titles" to work.

Look here:
Code:
    Dim All_Emblems_Offset As Integer = &H1DC20EC
    Dim All_Titles_Offset As Integer = &H1DC216C
Code:
Dim All_Emblems_And_Titles_Bytes As Byte() = {&HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF, &HFF}
If you only want to Unlock the Titles, then let the first "MW3.SetByte..." away.
Code:
Private Sub All_Emblems_And_Titles_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles All_Emblems_And_Titles.Click
            If PH.Process_Handle("iw5mp") Then
                MW3.SetByte(All_Emblems_Offset, All_Emblems_And_Titles_Bytes)
                MW3.SetByte(All_Titles_Offset, All_Emblems_And_Titles_Bytes)
            Else
                MsgBox("Game is not running!", , "Warning!")
            End If
    End Sub
PH is the Process Handle-Class from Jorndel.
It's checked if the Game is running, if yes, then it Hacks "All Emblems + Titles" and if not, then it comes a MessageBox with the Text "Game is not running!" and as Title of the MessageBox "Warning!".

Process Handle-Class by Jorndel (Released on MPGH)
Code:
Imports System.Runtime.InteropServices
Imports System.Text
Public Class MemoryClass1
#Region "Basic Stuff"
    <DllImport("kernel32.dll")> _
    Private Shared Function ReadProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <[In](), Out()> ByVal buffer As Byte(), ByVal size As UInt32, ByRef lpNumberOfBytesWritten As IntPtr) As Int32
    End Function
    <DllImport("kernel32.dll")> _
    Private Shared Function WriteProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <[In](), Out()> ByVal buffer As Byte(), ByVal size As UInt32, ByRef lpNumberOfBytesWritten As IntPtr) As Int32
    End Function
    <DllImport("user32.dll", CharSet:=CharSet.Auto, ExactSpelling:=True)> _
    Public Shared Function GetKeyState(ByVal virtualKeyCode As Keys) As Short
    End Function
    Private pHandel As IntPtr
    Public Function Process_Handle(ByVal ProcessName As String) As Boolean
        Try
            Dim ProcList As Process() = Process.GetProcessesByName(ProcessName)
            If ProcList.Length = 0 Then
                Return False
            Else
                pHandel = ProcList(0).Handle
                Return True
            End If
        Catch ex As Exception
            Console.Beep()
            Console.WriteLine("Process_Handle - " + ex.Message)
            Return False
        End Try
    End Function
    Private Function Read(ByVal Address As Integer, ByVal Length As Integer) As Byte()
        Dim Buffer As Byte() = New Byte(Length - 1) {}
        Dim Zero As IntPtr = IntPtr.Zero
        ReadProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
        Return Buffer
    End Function
    Private Sub Write(ByVal Address As Integer, ByVal Value As Integer)
        Dim Buffer As Byte() = BitConverter.GetBytes(Value)
        Dim Zero As IntPtr = IntPtr.Zero
        WriteProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
    End Sub
#End Region
#Region "Write Functions (Integer & String)"
    Public Sub WriteInteger(ByVal Address As Integer, ByVal Value As Integer)
        Write(Address, Value)
    End Sub
    Public Sub WriteString(ByVal Address As Integer, ByVal Text As String)
        Dim Buffer As Byte() = New ASCIIEncoding().GetBytes(Text)
        Dim Zero As IntPtr = IntPtr.Zero
        WriteProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
    End Sub
    Public Sub WriteBytes(ByVal Address As Integer, ByVal Bytes As Byte())
        Dim Zero As IntPtr = IntPtr.Zero
        WriteProcessMemory(pHandel, New IntPtr(Address), Bytes, CUInt(Bytes.Length), Zero)
    End Sub
    Public Sub WriteNOP(ByVal Address As Integer)
        Dim Buffer As Byte() = New Byte() {&H90, &H90, &H90, &H90, &H90}
        Dim Zero As IntPtr = IntPtr.Zero
        WriteProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
    End Sub
#End Region
#Region "Read Functions (Integer & String)"
    Public Function ReadInteger(ByVal Address As Integer, Optional ByVal Length As Integer = 4) As Integer
        Return BitConverter.ToInt32(Read(Address, Length), 0)
    End Function
    Public Function ReadString(ByVal Address As Integer, Optional ByVal Length As Integer = 4) As String
        Return New ASCIIEncoding().GetString(Read(Address, Length))
    End Function
    Public Function ReadBytes(ByVal Address As Integer, ByVal Length As Integer) As Byte()
        Return Read(Address, Length)
    End Function
#End Region
#Region "Extra"
    Public Function HotKey(ByVal Key As Keys) As Boolean
        Return Convert.ToBoolean(GetKeyState(Key))
    End Function
    Private Check_res As Boolean = True
    Public Function Check_Value(ByVal Value As String) As Integer
        For Each a As Char In Value
            If Char.IsNumber(a, 0) Then
                Check_res = True
            Else
                Check_res = False
                Return 0
                Exit For
            End If
        Next
        Return Convert.ToInt32(Value)
    End Function
#End Region
End Class
Damn...... I need help with coding if you have the time.
Progressive, you code?
Quote Originally Posted by Dylan View Post


Damn...... I need help with coding if you have the time.
Oh, mate ...
I have give you my Steam & Skype-Name and you have not add me, right? I don't know it, i become every day some Invites and requests to add.
I make now a little Trainer with Tutorial in it ('This is this and it makes this and this ...).
I give you later the Link.
@Pepsi-, if you need it too, then Message me in Skype or here on MPGH.
OH WOW..... ok im still not getting it i suck at this.....
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?