Guest User

Untitled

a guest
Feb 21st, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. #include <stdafx.h>
  2. #include <windows.h>
  3. #include <stdio.h>
  4. #include <time.h>
  5.  
  6. #include <cstdlib>
  7. #include <iostream>
  8. using namespace System;
  9.  
  10. #include <iostream>
  11. #include <conio.h>
  12. #define WIN32_LEAN_AND_MEAN
  13. #pragma comment( lib, "Msimg32.lib" )
  14. #pragma comment(lib, "user32.lib")
  15. #pragma comment(lib, "Kernel32.lib")
  16. #include <winuser.h>
  17.  
  18.  
  19.  
  20. using namespace std;
  21.  
  22.  
  23. void main()
  24. {
  25. DWORD money = 0xB7CE50;
  26. DWORD weather = 0xC81320;
  27. DWORD address1 = 0x00B6F5F0;
  28. DWORD offset = 0x540;
  29. DWORD offset2 = 0x42;
  30. DWORD wep1 = 0x969130;
  31. DWORD address2;
  32. DWORD cped;
  33. DWORD imm;
  34. DWORD imm1;
  35. DWORD imm2;
  36. int value = 0;
  37. DWORD weather1 = 0;
  38. DWORD weahter2 = 17;
  39. float health = 0.0;
  40. float test = 33;
  41. DWORD pid;
  42. HWND hwnd;
  43. hwnd = FindWindow(NULL,L"GTA:SA:MP");
  44.  
  45.  
  46. if(!hwnd)
  47. {
  48. cout <<"Window not found!\n";
  49. cin.get();
  50. }
  51. else
  52. {
  53. GetWindowThreadProcessId(hwnd,&pid);
  54. HANDLE phandle = OpenProcess(PROCESS_ALL_ACCESS,0,pid);
  55. if(!phandle)
  56. {
  57. cout <<"Could not get handle!\n";
  58. cin.get();
  59. }
  60. else
  61. {
  62. ReadProcessMemory(phandle,(void*)money,&value,sizeof(money),0);
  63. cout <<"Money:"<< value << "\n";
  64.  
  65. ReadProcessMemory(phandle,(void*)address1,&cped,sizeof(cped),0);
  66.  
  67. imm = cped+offset2;
  68. ReadProcessMemory(phandle,(void*)imm,&imm1,sizeof(int),0);
  69. cout <<"Immunities:"<< imm1 << "\n";
  70.  
  71. imm2 = imm1+4; //BP +4
  72.  
  73. address2 = cped+offset;
  74. ReadProcessMemory(phandle, (void*)address2, &health, sizeof(health),0);
  75. cout <<"HP:"<< health << "\n";
  76.  
  77. ReadProcessMemory(phandle,(void*)weather,&weather1,sizeof(weather1),0);
  78. cout <<"WeatherID:"<< weather1 << "\n";
  79.  
  80. while(1)
  81. {
  82. if(GetAsyncKeyState(VK_F1))
  83. {
  84. WriteProcessMemory(phandle, (void*)weather ,&weahter2, sizeof(weather1),0);
  85. }
  86.  
  87. if(GetAsyncKeyState(VK_F2))
  88. {
  89. WriteProcessMemory(phandle, (void*)imm, &imm2, sizeof(imm2),0); //BP
  90. //WriteProcessMemory(phandle, (void*)address2, &test, sizeof(test),0); // === hp auf 33
  91. }
  92.  
  93. if(GetAsyncKeyState(VK_F3))
  94. {
  95. WriteProcessMemory(phandle, (void*)imm, &imm1, sizeof(imm1),0); //BP
  96. //WriteProcessMemory(phandle, (void*)address2, &test, sizeof(test),0); // === hp auf 33
  97. }
  98. }
  99.  
  100. Sleep(1000);
  101. }
  102. }
  103. }
Add Comment
Please, Sign In to add comment