i made a hack for gta and it doesn't work

11/29/2013 18:51 momotd#1
hello guys i made a script for gta san andreas to add money but it doesn't work what should i do

Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <NomadMemory.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 174, 142, 192, 124)
$Checkbox1 = GUICtrlCreateCheckbox("Money", 56, 24, 81, 25)
$Button1 = GUICtrlCreateButton("start", 48, 72, 81, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
Case $Button1
   _Hack()		 
	EndSwitch
WEnd
Func _Hack(); This is the functions which turns on the hacks when you start S4 League.
	GUISetState(@SW_HIDE);
	ToolTip("Start Mta!",0,0); This is up in the corner which says Start S4 League!
	$WAIT = ProcessWait("Gta_sa.exe"); Waiting For The Process
	$PID = ProcessExists("Gta_sa.exe"); He found ProcessName.exe
	Sleep(500);Takes a little break..
	$OPEN = _MemoryOpen ($PID); The memory .. which makes the functions work.
	If GUICtrlRead($Checkbox1) = 1 Then
		_MemoryWrite(0xB7CE50,$OPEN,"9000000","long")
	EndIf
	Exit
EndFunc
11/29/2013 19:47 Acid#2
#moved
11/29/2013 20:53 Mephisto'#3
Quote:
Originally Posted by momotd View Post
hello guys i made a script for gta san andreas to add money but it doesn't work what should i do

Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <NomadMemory.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 174, 142, 192, 124)
$Checkbox1 = GUICtrlCreateCheckbox("Money", 56, 24, 81, 25)
$Button1 = GUICtrlCreateButton("start", 48, 72, 81, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
Case $Button1
   _Hack()		 
	EndSwitch
WEnd
Func _Hack(); This is the functions which turns on the hacks when you start S4 League.
	GUISetState(@SW_HIDE);
	ToolTip("Start Mta!",0,0); This is up in the corner which says Start S4 League!
	$WAIT = ProcessWait("Gta_sa.exe"); Waiting For The Process
	$PID = ProcessExists("Gta_sa.exe"); He found ProcessName.exe
	Sleep(500);Takes a little break..
	$OPEN = _MemoryOpen ($PID); The memory .. which makes the functions work.
	If GUICtrlRead($Checkbox1) = 1 Then
		_MemoryWrite(0xB7CE50,$OPEN,"9000000","long")
	EndIf
	Exit
EndFunc
You should learn Auto-It first and don't try to copy a source ;)
11/29/2013 22:12 Mostey#4
#moved
11/29/2013 22:22 qkuh#5
Wrong address?
11/29/2013 23:20 alpines#6
Try to do this
Code:
Local $iValue = 500000

$hMemory = _MemoryOpen(ProcessExists("gta_sa.exe"))
_MemoryWrite(0xB7CE50, $hMemory, $iValue, 'int')
_MemoryWrite(0xB7CE54, $hMemory, $iValue, 'int')
_MemoryWrite(0xBAA430, $hMemory, $iValue, 'int')
_MemoryClose($hMemory)
12/01/2013 21:35 erudite#7
PHP Code:
If GUICtrlRead($Checkbox1) = 1 Then
        _MemoryWrite
(0xB7CE50$OPEN9000000"long")
    EndIf 
Try this.


Are you sure the address is correct?
12/01/2013 22:12 alpines#8
No you don't need the baseaddress. The part I posted works fine for me. Maybe it does for him/her too.