Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ReadMemory(MADDRESS,PROGRAM)
- {
- winget, pid, PID, %PROGRAM%
- VarSetCapacity(MVALUE,4,0)
- ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
- DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)
- Loop 4
- result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)
- return, result
- }
- ReadMemoryFloat(MADDRESS=0,PROGRAM="")
- {
- Static OLDPROC, ProcessHandle
- VarSetCapacity(MVALUE,4,0)
- If PROGRAM != %OLDPROC%
- {
- WinGet, pid, pid, % OLDPROC := PROGRAM
- ProcessHandle := ( ProcessHandle ? 0*(closed:=DllCall("CloseHandle"
- ,"UInt",ProcessHandle)) : 0 )+(pid ? DllCall("OpenProcess"
- ,"Int",2035711,"Int",0,"UInt",pid) : 0)
- }
- If (ProcessHandle) && DllCall("ReadProcessMemory","UInt"
- ,ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)
- {
- MVALUE := *(&MVALUE+3)<<24 | *(&MVALUE+2)<<16 | *(&MVALUE+1)<<8 | *(&MVALUE)
- return (1-2*(MVALUE>>31)) * (2**((MVALUE>>23 & 255)-127)) * (1+(MVALUE & 8388607)/8388608)
- }
- return !ProcessHandle ? "Handle Closed: " closed : "Fail"
- }
- ; >>>>>>>>>> Binds <<<<<<<<<<
- #IfWinActive, GTA:SA:MP
- #UseHook
- #SingleInstance, Force
- Hotkey, Enter, Off
- Hotkey, Escape, Off
- +T::
- ~t::
- Suspend On
- Hotkey, Enter, On
- Hotkey, Escape, On
- Hotkey, t, Off
- return
- ~NumpadEnter::
- ~Enter::
- Suspend Permit
- Suspend Off
- Hotkey, t, On
- Hotkey, Enter, Off
- Hotkey, Escape, Off
- return
- ~Escape::
- Suspend Permit
- Suspend Off
- Hotkey, t, On
- Hotkey, Enter, Off
- Hotkey, Escape, Off
- return
- F3::
- pointer:=ReadMemory(0x00B6F5F0,"GTA:SA:MP")
- heal:=ReadMemoryFloat(pointer+1344,"GTA:SA:MP")
- StringTrimRight, heal, heal, 7
- SendInput t/f Ich habe noch %heal% HP!{Enter}
- Return
Add Comment
Please, Sign In to add comment