Advertisement
Guest User

Little MP Hack Source PureBasic

a guest
Oct 9th, 2012
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;{- Enumerations / DataSections
  2. ;{ Windows
  3. Enumeration
  4.   #Window_0
  5. EndEnumeration
  6. ;}
  7. ;{ Gadgets
  8. Enumeration
  9.   #UAV
  10.   #Laser
  11. EndEnumeration
  12. ;}
  13. Define.l Event, EventWindow, EventGadget, EventType, EventMenu
  14. ;}
  15. Global uavon.i = 1
  16. Global uavoff.i = 0
  17. Global laseron.i = 0
  18. Global laseroff.i = 37
  19. Procedure OpenWindow_Window_0()
  20.   If OpenWindow(#Window_0, 450, 525, 122, 56, "Little MP Hack 0.2", #PB_Window_SystemMenu|#PB_Window_TitleBar|#PB_Window_Tool)
  21.     CheckBoxGadget(#UAV, 0, 25, 100, 20, "Enable UAV")
  22.     CheckBoxGadget(#Laser, 0, 5, 95, 20, "Enable Laser")
  23.   EndIf
  24. EndProcedure
  25.  
  26. OpenWindow_Window_0()
  27.  
  28. window = FindWindow_("IW5","Call of Duty®: Modern Warfare® 3 Multiplayer")
  29. GetWindowThreadProcessId_(window, @ProcessID)
  30. hProcess = OpenProcess_(#PROCESS_ALL_ACCESS,0,ProcessID)
  31. If ProcessID = 0
  32.   MessageRequester("Error!","Please start first Call of Duty Modern Warfare 3!")
  33.   End
  34. EndIf
  35.  
  36. ;{- Event loop
  37. Repeat
  38. If GetGadgetState(#UAV) = #PB_Checkbox_Checked
  39.     ReadProcessMemory_(hProcess,95171072,@uread.i,4,0)
  40.     If uread.i <> 1
  41.       WriteProcessMemory_(hProcess,95171072,@uavon.i,4,0)
  42.     EndIf
  43.   ElseIf GetGadgetState(#UAV) = #PB_Checkbox_Unchecked
  44.     ReadProcessMemory_(hProcess,95171072,@uread.i,4,0)
  45.     If uread.i = 1
  46.       WriteProcessMemory_(hProcess,95171072,@uavoff.i,4,0)
  47.     EndIf
  48.   EndIf
  49. If GetGadgetState(#Laser) = #PB_Checkbox_Checked
  50.     ReadProcessMemory_(hProcess,4435095,@lread.i,4,0)
  51.     If lread.i <> 0
  52.       WriteProcessMemory_(hProcess,4435095,@laseron.i,4,0)
  53.     EndIf
  54.   ElseIf GetGadgetState(#Laser) = #PB_Checkbox_Unchecked
  55.     ReadProcessMemory_(hProcess,4435095,@lread.i,4,0)
  56.     If lread.i = 0
  57.       WriteProcessMemory_(hProcess,4435095,@laseroff.i,4,0)
  58.     EndIf
  59.   EndIf
  60.   Event = WaitWindowEvent()
  61.   Select Event
  62.     ; ////////////////////////
  63.     Case #PB_Event_CloseWindow
  64.       EventWindow = EventWindow()
  65.       If EventWindow = #Window_0
  66.         CloseWindow(#Window_0)
  67.         Break
  68.       EndIf
  69.   EndSelect
  70. ForEver
  71. ;
  72. ;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement