Guest User

Untitled

a guest
Apr 16th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ReadMemory(MADDRESS,PROGRAM)
  2. {
  3.       winget, pid, PID, %PROGRAM%
  4.  
  5.       VarSetCapacity(MVALUE,4,0)
  6.       ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
  7.       DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)
  8.  
  9.       Loop 4
  10.       result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)
  11.  
  12.       return, result
  13. }
  14.  
  15. ReadMemoryFloat(MADDRESS=0,PROGRAM="")
  16. {
  17.    Static OLDPROC, ProcessHandle
  18.    VarSetCapacity(MVALUE,4,0)
  19.    If PROGRAM != %OLDPROC%
  20.    {
  21.       WinGet, pid, pid, % OLDPROC := PROGRAM
  22.       ProcessHandle := ( ProcessHandle ? 0*(closed:=DllCall("CloseHandle"
  23.       ,"UInt",ProcessHandle)) : 0 )+(pid ? DllCall("OpenProcess"
  24.       ,"Int",2035711,"Int",0,"UInt",pid) : 0)
  25.    }
  26.    If (ProcessHandle) && DllCall("ReadProcessMemory","UInt"
  27.    ,ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)
  28.    {
  29.       MVALUE := *(&MVALUE+3)<<24 | *(&MVALUE+2)<<16 | *(&MVALUE+1)<<8 | *(&MVALUE)
  30.       return (1-2*(MVALUE>>31)) * (2**((MVALUE>>23 & 255)-127)) * (1+(MVALUE & 8388607)/8388608)
  31.    }
  32.    return !ProcessHandle ? "Handle Closed: " closed : "Fail"
  33. }
  34.  
  35. ; >>>>>>>>>> Binds <<<<<<<<<<
  36.  
  37. #IfWinActive, GTA:SA:MP
  38. #UseHook
  39. #SingleInstance, Force
  40.  
  41. Hotkey, Enter, Off
  42. Hotkey, Escape, Off
  43.  
  44.  
  45. +T::
  46. ~t::
  47. Suspend On
  48. Hotkey, Enter, On
  49. Hotkey, Escape, On
  50. Hotkey, t, Off
  51. return
  52.  
  53.  
  54. ~NumpadEnter::
  55. ~Enter::
  56. Suspend Permit
  57. Suspend Off
  58. Hotkey, t, On
  59. Hotkey, Enter, Off
  60. Hotkey, Escape, Off
  61. return
  62.  
  63. ~Escape::
  64. Suspend Permit
  65. Suspend Off
  66. Hotkey, t, On
  67. Hotkey, Enter, Off
  68. Hotkey, Escape, Off
  69. return
  70.  
  71. F3::
  72. pointer:=ReadMemory(0x00B6F5F0,"GTA:SA:MP")
  73. heal:=ReadMemoryFloat(pointer+1344,"GTA:SA:MP")
  74. StringTrimRight, heal, heal, 7
  75. SendInput t/f Ich habe noch %heal% HP!{Enter}
  76. Return
Add Comment
Please, Sign In to add comment