Guest User

Untitled

a guest
Feb 21st, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.62 KB | None | 0 0
  1. #include <stdafx.h>
  2. #include <windows.h>
  3. #include <stdio.h>
  4. #include <time.h>
  5. #include <winuser.h>
  6. #include <cstdlib>
  7. #include <iostream>
  8. #include <conio.h>
  9. #include <stdlib.h>
  10.  
  11. #pragma comment( lib, "Msimg32.lib" )
  12. #pragma comment(lib, "user32.lib")
  13. #pragma comment(lib, "Kernel32.lib")
  14.  
  15. #define WIN32_LEAN_AND_MEAN
  16.  
  17.  
  18. using namespace System;
  19. using namespace std;
  20.  
  21.  
  22. // VARIABLEN
  23. DWORD weather = 0xC81320; // Wetter Memory Address
  24. DWORD cpedaddr = 0xB6F5F0; // CPed-Pointer Memory Address
  25. DWORD offset2 = 0x42; //Offset für Immunities
  26. DWORD cped; //Inhalt von cpedaddr - Pointer
  27. DWORD imm; // CPed+offset2 ||-> Immunities Memory Address
  28. DWORD imm1; // Ausgangswert Immunities (ALL OFF)
  29. DWORD imm2; // imm1 + 4 = Bulletproof
  30. DWORD weather2 = 17; // WetterID, auf die gewechselt werden soll
  31. DWORD pid; //processId
  32. HWND hwnd; //Handle
  33.  
  34. //--------------------------
  35.  
  36.  
  37.  
  38.  
  39.  
  40. void gtacheck()
  41. {
  42. gtacheckanfang:
  43.  
  44. hwnd = FindWindow(NULL,L"GTA:SA:MP");
  45. if(!hwnd)
  46. {
  47. cout <<"===============================\n";
  48. cout <<"|| gta_sa.exe not found! ||\n";
  49. cout <<"|| Please start GTA:SA:MP ||\n";
  50. cout <<"===============================\n";
  51.  
  52. while(!hwnd)
  53. {
  54. hwnd = FindWindow(NULL,L"GTA:SA:MP");
  55. Sleep(100);
  56. }
  57. goto gtacheckanfang;
  58. }
  59.  
  60. else
  61. {
  62. GetWindowThreadProcessId(hwnd,&pid);
  63. HANDLE phandle = OpenProcess(PROCESS_ALL_ACCESS,0,pid);
  64. if(!phandle)
  65. {
  66. cout <<"Could not get handle!\n";
  67. cin.get();
  68. }
  69. else
  70. {
  71. cout <<"|| gta_sa.exe found! ||\n";
  72. cout <<"|| Enjoy! ||\n";
  73. cout <<"===============================\n";
  74. }
  75. }
  76. }
  77.  
  78. void hauptreadmemory()
  79. {
  80. GetWindowThreadProcessId(hwnd,&pid);
  81. HANDLE phandle = OpenProcess(PROCESS_ALL_ACCESS,0,pid);
  82.  
  83. //Pointer CPed
  84. ReadProcessMemory(phandle,(void*)cpedaddr,&cped,sizeof(cped),0);
  85.  
  86. //Immunities
  87. imm = cped+offset2;
  88. ReadProcessMemory(phandle,(void*)imm,&imm1,sizeof(imm1),0);
  89. imm2 = imm1+4; //BP +4
  90.  
  91. //Wetter
  92.  
  93. //HP
  94.  
  95. //Armour
  96.  
  97. //Geld
  98. }
  99.  
  100. void bptoggle()
  101. {
  102.  
  103. GetWindowThreadProcessId(hwnd,&pid);
  104. HANDLE phandle = OpenProcess(PROCESS_ALL_ACCESS,0,pid);
  105.  
  106. if(GetAsyncKeyState(VK_F2))
  107. {
  108.  
  109. WriteProcessMemory(phandle, (void*)imm, &imm2, sizeof(imm2),0); //BP
  110. cout <<"|| Schummeln an! ||\n";
  111. cout <<"===============================\n";
  112. Sleep(200);
  113.  
  114.  
  115. }
  116.  
  117. if(GetAsyncKeyState(VK_F3))
  118. {
  119. WriteProcessMemory(phandle, (void*)imm, &imm1, sizeof(imm1),0); //BP OFF
  120. cout <<"|| Schummeln aus! ||\n";
  121. cout <<"===============================\n";
  122. Sleep(200);
  123. }
  124. }
  125.  
  126. void wettercheat()
  127. {
  128.  
  129. GetWindowThreadProcessId(hwnd,&pid);
  130. HANDLE phandle = OpenProcess(PROCESS_ALL_ACCESS,0,pid);
  131.  
  132. if(GetAsyncKeyState(VK_F5))
  133. {
  134. WriteProcessMemory(phandle, (void*)weather ,&weather2, sizeof(weather2),0);
  135. cout <<"|| Schoenes Wetter! ||\n";
  136. cout <<"===============================\n";
  137. Sleep(200);
  138. }
  139. }
  140.  
  141. void byebye()
  142. {
  143. if(!FindWindow(NULL,L"GTA:SA:MP" ) )
  144. {
  145. cout <<"|| Bye Bye ||\n";
  146. cout <<"===============================\n";
  147. Sleep(750);
  148. MessageBox(NULL, L"Du hast GTA geschlossen!\npeterL zieht sich in seinen Bauwagen zurück.", L"peterL is not amused.", MB_ICONERROR);
  149. return;
  150. }
  151. }
  152.  
  153. void main()
  154. {
  155.  
  156. gtacheck();
  157. hauptreadmemory();
  158.  
  159. while(1)
  160. {
  161. bptoggle();
  162. wettercheat();
  163. byebye();
  164.  
  165. }
  166.  
  167.  
  168.  
  169. }
Add Comment
Please, Sign In to add comment