begin process at 2008 07 05 14:31:20
1 205 204 membres
180 nouveaux aujourd'hui
14 119 membres club

Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum.
Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !

TRAINER GTA SAN ANDREAS, WRITEPROCESS MEMORY


Information sur la source

Catégorie :Divers Classé sous : gta, trainer, sanandreas, cheat, triche Niveau : Débutant Date de création : 03/07/2005 Date de mise à jour : 04/07/2005 14:14:49 Vu / téléchargé: 70 854 / 1 499

Note :
9,2 / 10 - par 20 personnes
9,20 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10

Commentaire sur cette source (18)
Ajouter un commentaire et/ou une note

Description

Ce Trainer Permet de:

Donner de l'argent,
D'arêter le Temps
D'être invincible
Et d'avoir les munitions Illimité

Source

  • Option Explicit
  • Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
  • Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
  • Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
  • Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByVal lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
  • Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByVal lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
  • Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
  • Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
  • Private Declare Function Beep Lib "kernel32" ( _
  • ByVal dwFreq As Long, _
  • ByVal dwDuration As Long) As Long
  • Private Const PROCESS_ALL_ACCESS As Long = &H1F0FFF
  • Private Sub FreezeTime()
  • Dim hwnd As Long
  • Dim pid As Long
  • Dim pHandle As Long
  • Dim x As Integer
  • hwnd = FindWindow(vbNullString, "GTA: San Andreas")
  • If (hwnd = 0) Then hwnd = FindWindow(vbNullString, "GTA: San Andreas")
  • If (hwnd = 0) Then
  • lblState.Caption = "State: Jeu non Lancer."
  • Timer1.Enabled = False
  • Exit Sub
  • End If
  • GetWindowThreadProcessId hwnd, pid
  • pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
  • If (pHandle = 0) Then
  • lblState.Caption = "State: Couldn't get a process handle."
  • Timer1.Enabled = False
  • Exit Sub
  • End If
  • WriteProcessMemory pHandle, Hex2Dec("52CF53"), Hex2ASCII("90 90 90 90 90 90"), Len(Hex2ASCII("90 90 90 90 90 90")), 0&
  • CloseHandle pHandle
  • End Sub
  • Private Sub Command1_Click()
  • FreezeTime
  • End Sub
  • Private Sub Form_Load()
  • If App.PrevInstance = True Then
  • Unload Me
  • End
  • End If
  • Call Timer_Timer
  • End Sub
  • Private Sub Form_Activate()
  • Timer.Enabled = True
  • End Sub
  • Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  • Unload Me
  • End
  • End Sub
  • Private Sub DeFreezeTime()
  • Dim hwnd As Long
  • Dim pid As Long
  • Dim pHandle As Long
  • Dim x As Integer
  • hwnd = FindWindow(vbNullString, "GTA: San Andreas")
  • If (hwnd = 0) Then hwnd = FindWindow(vbNullString, "GTA: San Andreas")
  • If (hwnd = 0) Then
  • lblState.Caption = "State: Jeu non Lancer."
  • Timer1.Enabled = False
  • Exit Sub
  • End If
  • GetWindowThreadProcessId hwnd, pid
  • pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
  • If (pHandle = 0) Then
  • lblState.Caption = "State: Couldn't get a process handle."
  • Timer1.Enabled = False
  • Exit Sub
  • End If
  • WriteProcessMemory pHandle, Hex2Dec("52CF53"), Hex2ASCII("FE 05 52 01 B7 00"), Len(Hex2ASCII("FE 05 52 01 B7 00")), 0&
  • CloseHandle pHandle
  • End Sub
  • Private Sub lblMapOn_Click()
  • DeFreezeTime
  • End Sub
  • Private Sub Picture1_Click()
  • FrmAbout.Show
  • End Sub
  • Private Sub Timer_Timer()
  • Dim hwnd As Long
  • Dim pid As Long
  • Dim pHandle As Long
  • Dim data(1 To 13) As String * 37
  • Dim x As Integer
  • Dim dlen As Integer
  • hwnd = FindWindow(vbNullString, "GTA: San Andreas")
  • If (hwnd = 0) Then hwnd = FindWindow(vbNullString, "GTA: San Andreas")
  • If (hwnd = 0) Then
  • lblState.Caption = "State: Jeu non Lancer."
  • Timer1.Enabled = False
  • Exit Sub
  • End If
  • GetWindowThreadProcessId hwnd, pid
  • pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
  • If (pHandle = 0) Then
  • lblState.Caption = "State: Couldn't get a process handle."
  • Timer1.Enabled = False
  • Exit Sub
  • End If
  • CloseHandle pHandle
  • For x = 1 To 13
  • dlen = Len("89 46 08")
  • If Mid(data(x), 1, dlen) <> "89 46 08" Then GoTo 1
  • Next x
  • Exit Sub
  • 1:
  • lblState.Caption = "State: Jeu Lancer."
  • Timer1.Enabled = True
  • Exit Sub
  • End Sub
  • Private Function Hex2ASCII(sText As String) As String
  • On Error Resume Next
  • Dim sBuff() As String, A As Long
  • sBuff() = Split(sText, Space$(1))
  • For A = 0 To UBound(sBuff)
  • Hex2ASCII = Hex2ASCII & Chr$("&h" & sBuff(A))
  • DoEvents
  • Next A
  • End Function
  • Private Function Hex2Dec(sText As String) As Long
  • On Error GoTo err
  • Dim H As String
  • H = sText
  • Dim Tmp$
  • Dim lo1 As Integer, lo2 As Integer
  • Dim hi1 As Long, hi2 As Long
  • Const Hx = "&H"
  • Const BigShift = 65536
  • Const LilShift = 256, Two = 2
  • Tmp = H
  • If UCase(Left$(H, 2)) = "&H" Then Tmp = Mid$(H, 3)
  • Tmp = Right$("0000000" & Tmp, 8)
  • If IsNumeric(Hx & Tmp) Then
  • lo1 = CInt(Hx & Right$(Tmp, Two))
  • hi1 = CLng(Hx & Mid$(Tmp, 5, Two))
  • lo2 = CInt(Hx & Mid$(Tmp, 3, Two))
  • hi2 = CLng(Hx & Left$(Tmp, Two))
  • Hex2Dec = CCur(hi2 * LilShift + lo2) * BigShift + (hi1 * LilShift) + lo1
  • End If
  • Exit Function
  • err:
  • End Function
  • Private Sub Timer1_Timer()
  • If GetAsyncKeyState(116) Then 'F5
  • GiveMoney
  • Bip 300, 150
  • End If
  • If GetAsyncKeyState(117) Then 'F6
  • FreezeTime
  • Bip 300, 150
  • End If
  • If GetAsyncKeyState(118) Then 'F7
  • DeFreezeTime
  • Bip 200, 150
  • End If
  • If GetAsyncKeyState(119) Then 'F8
  • IllimitedLife
  • Bip 300, 150
  • End If
  • If GetAsyncKeyState(120) Then 'F9
  • UnllimitedLife
  • Bip 200, 150
  • End If
  • If GetAsyncKeyState(121) Then 'F10
  • IllimitedAmmo
  • Bip 300, 150
  • End If
  • If GetAsyncKeyState(122) Then 'F11
  • UnllimitedAmmo
  • Bip 200, 150
  • End If
  • 'If GetAsyncKeyState(123) Then
  • 'Text1.Text = "F12"
  • 'Bip 300, 150
  • 'End if
  • End Sub
  • Sub Bip(f, d)
  • Beep f, d
  • End Sub
  • Private Sub GiveMoney()
  • Dim hwnd As Long
  • Dim pid As Long
  • Dim pHandle As Long
  • Dim x As Integer
  • hwnd = FindWindow(vbNullString, "GTA: San Andreas")
  • If (hwnd = 0) Then hwnd = FindWindow(vbNullString, "GTA: San Andreas")
  • If (hwnd = 0) Then
  • lblState.Caption = "State: Jeu non Lancer."
  • Exit Sub
  • End If
  • GetWindowThreadProcessId hwnd, pid
  • pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
  • If (pHandle = 0) Then
  • lblState.Caption = "State: Couldn't get a process handle."
  • Exit Sub
  • End If
  • WriteProcessMemory pHandle, Hex2Dec("B7CE50"), Hex2ASCII("FF FF FF"), Len(Hex2ASCII("FF FF FF")), 0&
  • CloseHandle pHandle
  • End Sub
  • Private Sub IllimitedLife()
  • Dim hwnd As Long
  • Dim pid As Long
  • Dim pHandle As Long
  • Dim x As Integer
  • hwnd = FindWindow(vbNullString, "GTA: San Andreas")
  • If (hwnd = 0) Then hwnd = FindWindow(vbNullString, "GTA: San Andreas")
  • If (hwnd = 0) Then
  • lblState.Caption = "State: Jeu non Lancer."
  • Exit Sub
  • End If
  • GetWindowThreadProcessId hwnd, pid
  • pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
  • If (pHandle = 0) Then
  • lblState.Caption = "State: Couldn't get a process handle."
  • Exit Sub
  • End If
  • WriteProcessMemory pHandle, Hex2Dec("4B331F"), Hex2ASCII("90 90 90 90 90 90"), Len(Hex2ASCII("90 90 90 90 90 90")), 0&
  • WriteProcessMemory pHandle, Hex2Dec("4B32B4"), Hex2ASCII("90 90 90 90 90 90"), Len(Hex2ASCII("90 90 90 90 90 90")), 0&
  • CloseHandle pHandle
  • End Sub
  • Private Sub UnllimitedLife()
  • Dim hwnd As Long
  • Dim pid As Long
  • Dim pHandle As Long
  • Dim x As Integer
  • hwnd = FindWindow(vbNullString, "GTA: San Andreas")
  • If (hwnd = 0) Then hwnd = FindWindow(vbNullString, "GTA: San Andreas")
  • If (hwnd = 0) Then
  • lblState.Caption = "State: Jeu non Lancer."
  • Exit Sub
  • End If
  • GetWindowThreadProcessId hwnd, pid
  • pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
  • If (pHandle = 0) Then
  • lblState.Caption = "State: Couldn't get a process handle."
  • Exit Sub
  • End If
  • WriteProcessMemory pHandle, Hex2Dec("4B331F"), Hex2ASCII("89 96 40 05 00 00"), Len(Hex2ASCII("89 96 40 05 00 00")), 0&
  • WriteProcessMemory pHandle, Hex2Dec("4B32B4"), Hex2ASCII("D9 96 40 05 00 00"), Len(Hex2ASCII("90 90 90 90 90 90")), 0&
  • CloseHandle pHandle
  • End Sub
  • Private Sub IllimitedAmmo()
  • Dim hwnd As Long
  • Dim pid As Long
  • Dim pHandle As Long
  • Dim x As Integer
  • hwnd = FindWindow(vbNullString, "GTA: San Andreas")
  • If (hwnd = 0) Then hwnd = FindWindow(vbNullString, "GTA: San Andreas")
  • If (hwnd = 0) Then
  • lblState.Caption = "State: Jeu non Lancer."
  • Exit Sub
  • End If
  • GetWindowThreadProcessId hwnd, pid
  • pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
  • If (pHandle = 0) Then
  • lblState.Caption = "State: Couldn't get a process handle."
  • Exit Sub
  • End If
  • WriteProcessMemory pHandle, Hex2Dec("7428B0"), Hex2ASCII("90 90 90"), Len(Hex2ASCII("90 90 90")), 0&
  • WriteProcessMemory pHandle, Hex2Dec("7428E6"), Hex2ASCII("90 90 90"), Len(Hex2ASCII("90 90 90")), 0&
  • CloseHandle pHandle
  • End Sub
  • Private Sub UnllimitedAmmo()
  • Dim hwnd As Long
  • Dim pid As Long
  • Dim pHandle As Long
  • Dim x As Integer
  • hwnd = FindWindow(vbNullString, "GTA: San Andreas")
  • If (hwnd = 0) Then hwnd = FindWindow(vbNullString, "GTA: San Andreas")
  • If (hwnd = 0) Then
  • lblState.Caption = "State: Jeu non Lancer."
  • Exit Sub
  • End If
  • GetWindowThreadProcessId hwnd, pid
  • pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
  • If (pHandle = 0) Then
  • lblState.Caption = "State: Couldn't get a process handle."
  • Exit Sub
  • End If
  • WriteProcessMemory pHandle, Hex2Dec("7428B0"), Hex2ASCII("89 46 08"), Len(Hex2ASCII("89 46 08")), 0&
  • WriteProcessMemory pHandle, Hex2Dec("7428E6"), Hex2ASCII("FF 4E 0C"), Len(Hex2ASCII("FF 4E 0C")), 0&
  • CloseHandle pHandle
  • End Sub
Option Explicit

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByVal lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByVal lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Declare Function Beep Lib "kernel32" ( _
ByVal dwFreq As Long, _
ByVal dwDuration As Long) As Long
Private Const PROCESS_ALL_ACCESS As Long = &H1F0FFF
Private Sub FreezeTime()
Dim hwnd As Long
Dim pid As Long
Dim pHandle As Long
Dim x As Integer

hwnd = FindWindow(vbNullString, "GTA: San Andreas")
If (hwnd = 0) Then hwnd = FindWindow(vbNullString, "GTA: San Andreas")

If (hwnd = 0) Then
    lblState.Caption = "State: Jeu non Lancer."
    Timer1.Enabled = False
    Exit Sub
End If

GetWindowThreadProcessId hwnd, pid

pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)

If (pHandle = 0) Then
    lblState.Caption = "State: Couldn't get a process handle."
    Timer1.Enabled = False
    Exit Sub
End If

WriteProcessMemory pHandle, Hex2Dec("52CF53"), Hex2ASCII("90 90 90 90 90 90"), Len(Hex2ASCII("90 90 90 90 90 90")), 0&

CloseHandle pHandle
End Sub

Private Sub Command1_Click()
FreezeTime
End Sub

Private Sub Form_Load()
If App.PrevInstance = True Then
    Unload Me
    End
End If

Call Timer_Timer
End Sub

Private Sub Form_Activate()
Timer.Enabled = True
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Unload Me
End
End Sub

Private Sub DeFreezeTime()
Dim hwnd As Long
Dim pid As Long
Dim pHandle As Long
Dim x As Integer

hwnd = FindWindow(vbNullString, "GTA: San Andreas")
If (hwnd = 0) Then hwnd = FindWindow(vbNullString, "GTA: San Andreas")

If (hwnd = 0) Then
    lblState.Caption = "State: Jeu non Lancer."
    Timer1.Enabled = False
    Exit Sub
End If

GetWindowThreadProcessId hwnd, pid

pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)

If (pHandle = 0) Then
    lblState.Caption = "State: Couldn't get a process handle."
    Timer1.Enabled = False
    Exit Sub
End If

WriteProcessMemory pHandle, Hex2Dec("52CF53"), Hex2ASCII("FE 05 52 01 B7 00"), Len(Hex2ASCII("FE 05 52 01 B7 00")), 0&

CloseHandle pHandle
End Sub

Private Sub lblMapOn_Click()
DeFreezeTime
End Sub

Private Sub Picture1_Click()
FrmAbout.Show
End Sub

Private Sub Timer_Timer()
Dim hwnd As Long
Dim pid As Long
Dim pHandle As Long
Dim data(1 To 13) As String * 37
Dim x As Integer
Dim dlen As Integer

hwnd = FindWindow(vbNullString, "GTA: San Andreas")
If (hwnd = 0) Then hwnd = FindWindow(vbNullString, "GTA: San Andreas")

If (hwnd = 0) Then
    lblState.Caption = "State: Jeu non Lancer."
    Timer1.Enabled = False
    Exit Sub
End If

GetWindowThreadProcessId hwnd, pid

pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)

If (pHandle = 0) Then
    lblState.Caption = "State: Couldn't get a process handle."
    Timer1.Enabled = False
    Exit Sub
End If

CloseHandle pHandle

For x = 1 To 13
    dlen = Len("89 46 08")
    If Mid(data(x), 1, dlen) <> "89 46 08" Then GoTo 1
Next x

Exit Sub

1:

lblState.Caption = "State: Jeu Lancer."
Timer1.Enabled = True

Exit Sub
End Sub

Private Function Hex2ASCII(sText As String) As String
On Error Resume Next
Dim sBuff() As String, A As Long
sBuff() = Split(sText, Space$(1))
For A = 0 To UBound(sBuff)
Hex2ASCII = Hex2ASCII & Chr$("&h" & sBuff(A))
DoEvents
Next A
End Function

Private Function Hex2Dec(sText As String) As Long
On Error GoTo err
Dim H As String
H = sText
Dim Tmp$
Dim lo1 As Integer, lo2 As Integer
Dim hi1 As Long, hi2 As Long
Const Hx = "&H"
Const BigShift = 65536
Const LilShift = 256, Two = 2
Tmp = H
If UCase(Left$(H, 2)) = "&H" Then Tmp = Mid$(H, 3)
Tmp = Right$("0000000" & Tmp, 8)
If IsNumeric(Hx & Tmp) Then
lo1 = CInt(Hx & Right$(Tmp, Two))
hi1 = CLng(Hx & Mid$(Tmp, 5, Two))
lo2 = CInt(Hx & Mid$(Tmp, 3, Two))
hi2 = CLng(Hx & Left$(Tmp, Two))
Hex2Dec = CCur(hi2 * LilShift + lo2) * BigShift + (hi1 * LilShift) + lo1
End If
Exit Function
err:
End Function

Private Sub Timer1_Timer()
If GetAsyncKeyState(116) Then 'F5
GiveMoney
Bip 300, 150
End If

If GetAsyncKeyState(117) Then 'F6
FreezeTime
Bip 300, 150
End If

If GetAsyncKeyState(118) Then 'F7
DeFreezeTime
Bip 200, 150
End If

If GetAsyncKeyState(119) Then 'F8
IllimitedLife
Bip 300, 150
End If

If GetAsyncKeyState(120) Then 'F9
UnllimitedLife
Bip 200, 150
End If

If GetAsyncKeyState(121) Then 'F10
IllimitedAmmo
Bip 300, 150
End If

If GetAsyncKeyState(122) Then 'F11
UnllimitedAmmo
Bip 200, 150
End If
'If GetAsyncKeyState(123) Then
'Text1.Text = "F12"
'Bip 300, 150
'End if
End Sub


Sub Bip(f, d)
Beep f, d
End Sub

Private Sub GiveMoney()
Dim hwnd As Long
Dim pid As Long
Dim pHandle As Long
Dim x As Integer

hwnd = FindWindow(vbNullString, "GTA: San Andreas")
If (hwnd = 0) Then hwnd = FindWindow(vbNullString, "GTA: San Andreas")

If (hwnd = 0) Then
    lblState.Caption = "State: Jeu non Lancer."
    Exit Sub
End If

GetWindowThreadProcessId hwnd, pid

pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)

If (pHandle = 0) Then
    lblState.Caption = "State: Couldn't get a process handle."
    Exit Sub
End If
WriteProcessMemory pHandle, Hex2Dec("B7CE50"), Hex2ASCII("FF FF FF"), Len(Hex2ASCII("FF FF FF")), 0&

CloseHandle pHandle
End Sub

Private Sub IllimitedLife()
Dim hwnd As Long
Dim pid As Long
Dim pHandle As Long
Dim x As Integer

hwnd = FindWindow(vbNullString, "GTA: San Andreas")
If (hwnd = 0) Then hwnd = FindWindow(vbNullString, "GTA: San Andreas")

If (hwnd = 0) Then
    lblState.Caption = "State: Jeu non Lancer."
    Exit Sub
End If

GetWindowThreadProcessId hwnd, pid

pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)

If (pHandle = 0) Then
    lblState.Caption = "State: Couldn't get a process handle."
    Exit Sub
End If
WriteProcessMemory pHandle, Hex2Dec("4B331F"), Hex2ASCII("90 90 90 90 90 90"), Len(Hex2ASCII("90 90 90 90 90 90")), 0&
WriteProcessMemory pHandle, Hex2Dec("4B32B4"), Hex2ASCII("90 90 90 90 90 90"), Len(Hex2ASCII("90 90 90 90 90 90")), 0&

CloseHandle pHandle
End Sub

Private Sub UnllimitedLife()
Dim hwnd As Long
Dim pid As Long
Dim pHandle As Long
Dim x As Integer

hwnd = FindWindow(vbNullString, "GTA: San Andreas")
If (hwnd = 0) Then hwnd = FindWindow(vbNullString, "GTA: San Andreas")

If (hwnd = 0) Then
    lblState.Caption = "State: Jeu non Lancer."
    Exit Sub
End If

GetWindowThreadProcessId hwnd, pid

pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)

If (pHandle = 0) Then
    lblState.Caption = "State: Couldn't get a process handle."
    Exit Sub
End If
WriteProcessMemory pHandle, Hex2Dec("4B331F"), Hex2ASCII("89 96 40 05 00 00"), Len(Hex2ASCII("89 96 40 05 00 00")), 0&
WriteProcessMemory pHandle, Hex2Dec("4B32B4"), Hex2ASCII("D9 96 40 05 00 00"), Len(Hex2ASCII("90 90 90 90 90 90")), 0&

CloseHandle pHandle
End Sub

Private Sub IllimitedAmmo()
Dim hwnd As Long
Dim pid As Long
Dim pHandle As Long
Dim x As Integer

hwnd = FindWindow(vbNullString, "GTA: San Andreas")
If (hwnd = 0) Then hwnd = FindWindow(vbNullString, "GTA: San Andreas")

If (hwnd = 0) Then
    lblState.Caption = "State: Jeu non Lancer."
    Exit Sub
End If

GetWindowThreadProcessId hwnd, pid

pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)

If (pHandle = 0) Then
    lblState.Caption = "State: Couldn't get a process handle."
    Exit Sub
End If
WriteProcessMemory pHandle, Hex2Dec("7428B0"), Hex2ASCII("90 90 90"), Len(Hex2ASCII("90 90 90")), 0&
WriteProcessMemory pHandle, Hex2Dec("7428E6"), Hex2ASCII("90 90 90"), Len(Hex2ASCII("90 90 90")), 0&

CloseHandle pHandle
End Sub

Private Sub UnllimitedAmmo()
Dim hwnd As Long
Dim pid As Long
Dim pHandle As Long
Dim x As Integer

hwnd = FindWindow(vbNullString, "GTA: San Andreas")
If (hwnd = 0) Then hwnd = FindWindow(vbNullString, "GTA: San Andreas")

If (hwnd = 0) Then
    lblState.Caption = "State: Jeu non Lancer."
    Exit Sub
End If

GetWindowThreadProcessId hwnd, pid

pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)

If (pHandle = 0) Then
    lblState.Caption = "State: Couldn't get a process handle."
    Exit Sub
End If
WriteProcessMemory pHandle, Hex2Dec("7428B0"), Hex2ASCII("89 46 08"), Len(Hex2ASCII("89 46 08")), 0&
WriteProcessMemory pHandle, Hex2Dec("7428E6"), Hex2ASCII("FF 4E 0C"), Len(Hex2ASCII("FF 4E 0C")), 0&

CloseHandle pHandle
End Sub

Conclusion

Si vous voulez proposer des amélioration,etc.
Et Dite des commentaire

Source mis à jour, ajout de l'exe manquant
Pour les "Membres Club", vous pouvez télécharger directement un fichier contenu dans le zip sans télécharger le zip en entier !

Télécharger le zip

04 juillet 2005 14:14:49 :
Ajout de l'exe
  • signaler à un administrateur
    Commentaire de EBArtSoft le 03/07/2005 15:24:08 administrateur CS

    Super ! c'est simple net et ça repond au besoin. Cela dit CodeS-SourceS ne cautionne pas vraiment ce type de code...

    @+

  • signaler à un administrateur
    Commentaire de wallon14 le 03/07/2005 15:30:29

    Y'en à encore pour GTA VC, alors pourquoi pas GTA SA... !

    Très bien le code ! Par contre "Mortel" ne s'écrit pas "Mortelle" :o) (oui je chipote)

    Dommage que San Andreas soit plein de "bugs"...

  • signaler à un administrateur
    Commentaire de Pym Corp le 03/07/2005 16:45:31

    Comment à tu trouver les valeurs à modifier ? ArtMoney je suppose ?

  • signaler à un administrateur
    Commentaire de Rudy3212 le 03/07/2005 17:52:13

    Non je l'ai ai trouver avec tsearch, mais je vait faire des commentaire dans la source

  • signaler à un administrateur
    Commentaire de Pym Corp le 03/07/2005 18:14:57

    Oui ou t-search ;)

  • signaler à un administrateur
    Commentaire de hhhp2004 le 03/07/2005 22:46:12

    salut,

    une question :

    sous quelle forme sont les valeurs dans la memoire, hexadecimale ?

    moi aussi jai fait un prog qui est capable decrire et de lire dans la memoire dun processus, le prog peut facilement tromper des jeux venant avec windows (spider solitaire,etc.) mais quand jesseye decrire dans la memoire de age of empires par exemple il ny a rien qui se passe ...
    donc peutetre que le jeu en question stocke les valeurs sous forme hexadecimale, au lieu de chercher 10000 par exemple on doit chercher lequivalent en hex, cest bien ca ?

    ce qui est bizzare alors cest que si on cherche dans la memoire de spider solitaire ladresse qui contient le score on doit transformer les chiffres en lettres(ex. si le score est de 100 on cherche "d", la meme chose pour ecrire dans la memoire) et ca marche (on trouve ladresse ou spider solitaire stocke le score :16854880)

    jai deja pose beaucoup de questions sur le forum sur writeprocessmemory mais ... pas beaucoup de reponses ...

    http://www.vbfrance.com/forum.v2.aspx?id=415862
    ou faites une recherche sur le site sur writeprocessmemory

  • signaler à un administrateur
    Commentaire de sam013 le 04/07/2005 11:59:25

    salut pourquoi le site dit qu'il y a un EXE alors que dans le zip : y'en a pas

  • signaler à un administrateur
    Commentaire de Rudy3212 le 04/07/2005 14:12:09

    Moi les valeurs patché sont en hexa, donc je voit pas ce qui marche pas, mais donne moi ton prog qui patch je vait voir.

    Et pour l'exe dans le zip, ca a bogue je l'avait mis c'est pour ca qui dit qu'il y est mais en téléchargent l'archive il y est pas, je comprend pas, je vait voir si je peut le remettre.

  • signaler à un administrateur
    Commentaire de Totoroyamada le 09/08/2005 16:56:18

    "Non je l'ai ai trouver avec tsearch"
    Kézako? Ta source est un peu obscure pour moi, cette histoire de patcher la mémoire me dépasse un peu... Où vas-tu donc trouver toutes les valeurs?
    J'ai tenté de faire un petit prog qui envoie les séquences de touches à GTA SA mais rien ne passe... SendKeys.Send, keyb_event... Mon prog intercepte bien le fait que je presse F8 par exemple mais impossible d'envoyer quoi que ce soit vers GTA... Quelqu'un a une idée? Merci d'avance...

  • signaler à un administrateur
    Commentaire de Rudy3212 le 10/09/2005 16:20:12

    Oui je sais les send key marche pas dans San Andreas, Donc c'est pour sa que je patch les valeur en mémoire, moi ma technique ne tape pas les codes.

  • signaler à un administrateur
    Commentaire de amy16000 le 16/09/2005 20:33:38

    slt j'ai trouvé le jeu san andreas tres interessant mais j'ai pas les codes alors soyez geniaux et ecrivez les.chaw.

  • signaler à un administrateur
    Commentaire de stef2004 le 16/11/2005 13:14:46

    je vais essayer d'expliquer vite fait. (je prends l'exemple du jeu risk 2 ou tu as des renforcements à chaque tour). Tsearch est un outil qui permet d'"ouvrir" les adresses mémoire d'un exécutable lancé. On peut trouver ainsi une adresse à modifier pour changer par exempoe le nombre de munitions. Mais attention, cette adresse ne sera plus la même si on quitte et on relance le jeu. C'est pour cela que, pour en revenir a mon exemple du risk, je recherche toujours avec tsearch la fonction qui fait en sorte que quand on place un renforcement dans un pays, on en a un en moins dans ceux qui restent à placer. Exemple: XXXXXX. A coté on a une instruction ASM (ca ca doit vous etre connu quand meme ;)). On noppe (90) avec le nombre nécessaire pour couvrir toute la fonction et pas plus, mais on note le code d'origine. De cette manière, chez moi le nombre de renforcements arrete de diminiuer. Si par contre je ne remets pas la fonction à un certain moment, je ne peux pas passer au tour suivant.
    Si je n'ai pas été assez clair ou vous ovulez des infos en plus, n'hésitez pas

    Stef2004
    http://www.stef2004.com

  • signaler à un administrateur
    Commentaire de Rudy3212 le 03/12/2005 12:48:01

    Si tu a été très clair afin pour moi mais jle savait, mais sa peut aidez car tout le monde crois que les trainer tape les code, c'est vrai pour les trainer qu'il y a sur ce site (pour GTA 3) mais dans San Andreas sa ne marchait pas donc voila pourquoi j'ai fait se trainer et jlé poster pour que les gen comprenne comment marche els vraix trainer

  • signaler à un administrateur
    Commentaire de stef2004 le 03/12/2005 18:36:40

    A votre service ;)
    Par contre je viens de me relire...mdrrrrrr
    "vous ovulez des infos en plus"
    c'est pas ovulez, hein...
    A+
    stef2004
    www.stef2004.com

  • signaler à un administrateur
    Commentaire de joelindi1 le 22/12/2005 10:28:09

    J'ai lu quelque part que les exe étaient supprimés avant le téléchargement...

  • signaler à un administrateur
    Commentaire de d0nan le 03/11/2006 11:52:22

    Comment faire pour que sa fonctionnne dans Gta - Sa svp ?

  • signaler à un administrateur
    Commentaire de UZI_I le 08/02/2007 17:45:46

    Tout D'abord merci a tous !

    Je voulais te demander un truc c'est quel VB que tu utilise ici ?

    Que je puisse le conpiler comme il faut !

    Et sinon moi j'ai créer des truc de la sorte mais, il me dit que la mémoire est protéger !

    Merci de ta future aide...

  • signaler à un administrateur
    Commentaire de nfs65 le 10/02/2007 16:04:52

    heu j'ai un souci avec ce code...
    je ne peux pas compiler car " lblState " n'est pas déclarer! que dois-je faire pour pouvoir compiler?

Ajouter un commentaire

Pub



Appels d'offres

Plugin Dialer outlook
Budget : 2 000€
Travail graphique- ill...
Budget : 1 000€
creation de marque et ...
Budget : 1 000€

CalendriCode

Juillet 2008
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

VS Express FR Gratuit !

VS Express en français et 100% gratuit !

Boutique

Boutique de goodies CodeS-SourceS