Prefixobjekt
Active member
- Joined
- Aug 1, 2014
- Messages
- 55
- Reaction score
- 0
Hey,
i try to make a gamespeed hack with autohotkey.
if i want to write to the address, she turns back to standart value.
how can I change it?
how to set the value?
help pls
i try to make a gamespeed hack with autohotkey.
if i want to write to the address, she turns back to standart value.
how can I change it?
Code:
readMemory(hProcess, dwAddress, dwLen=4, type="UInt") {
if(!hProcess) {
ErrorLevel := ERROR_INVALID_HANDLE
return 0
}
VarSetCapacity(dwRead, dwLen)
dwRet := DllCall( "ReadProcessMemory"
, "UInt", hProcess
, "UInt", dwAddress
, "Str", dwRead
, "UInt", dwLen
, "UInt*", 0)
if(dwRet == 0) {
ErrorLevel := ERROR_READ_MEMORY
return 0
}
ErrorLevel := ERROR_OK
return NumGet(dwRead, 0, type)
}
writeMemory(hProcess,address,writevalue,length=4, datatype="int") {
if(!hProcess) {
ErrorLevel := ERROR_INVALID_HANDLE
return false
}
VarSetCapacity(finalvalue,length, 0)
NumPut(writevalue,finalvalue,0,datatype)
dwRet := DllCall( "WriteProcessMemory"
,"Uint",hProcess
,"Uint",address
,"Uint",&finalvalue
,"Uint",length
,"Uint",0)
if(dwRet == 0) {
ErrorLevel := ERROR_WRITE_MEMORY
return false
}
ErrorLevel := ERROR_OK
return true
}
writeMemory(hGTA, 0xB7CB64, 300, 4, "float")
how to set the value?
help pls