Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdafx.h>
- #include <windows.h>
- #include <stdio.h>
- #include <time.h>
- #include <cstdlib>
- #include <iostream>
- using namespace System;
- #include <iostream>
- #include <conio.h>
- #define WIN32_LEAN_AND_MEAN
- #pragma comment( lib, "Msimg32.lib" )
- #pragma comment(lib, "user32.lib")
- #pragma comment(lib, "Kernel32.lib")
- #include <winuser.h>
- using namespace std;
- void main()
- {
- DWORD money = 0xB7CE50;
- DWORD weather = 0xC81320;
- DWORD address1 = 0x00B6F5F0;
- DWORD offset = 0x540;
- DWORD offset2 = 0x42;
- DWORD wep1 = 0x969130;
- DWORD address2;
- DWORD cped;
- DWORD imm;
- DWORD imm1;
- DWORD imm2;
- int value = 0;
- DWORD weather1 = 0;
- DWORD weahter2 = 17;
- float health = 0.0;
- float test = 33;
- DWORD pid;
- HWND hwnd;
- hwnd = FindWindow(NULL,L"GTA:SA:MP");
- if(!hwnd)
- {
- cout <<"Window not found!\n";
- cin.get();
- }
- else
- {
- GetWindowThreadProcessId(hwnd,&pid);
- HANDLE phandle = OpenProcess(PROCESS_ALL_ACCESS,0,pid);
- if(!phandle)
- {
- cout <<"Could not get handle!\n";
- cin.get();
- }
- else
- {
- ReadProcessMemory(phandle,(void*)money,&value,sizeof(money),0);
- cout <<"Money:"<< value << "\n";
- ReadProcessMemory(phandle,(void*)address1,&cped,sizeof(cped),0);
- imm = cped+offset2;
- ReadProcessMemory(phandle,(void*)imm,&imm1,sizeof(int),0);
- cout <<"Immunities:"<< imm1 << "\n";
- imm2 = imm1+4; //BP +4
- address2 = cped+offset;
- ReadProcessMemory(phandle, (void*)address2, &health, sizeof(health),0);
- cout <<"HP:"<< health << "\n";
- ReadProcessMemory(phandle,(void*)weather,&weather1,sizeof(weather1),0);
- cout <<"WeatherID:"<< weather1 << "\n";
- while(1)
- {
- if(GetAsyncKeyState(VK_F1))
- {
- WriteProcessMemory(phandle, (void*)weather ,&weahter2, sizeof(weather1),0);
- }
- if(GetAsyncKeyState(VK_F2))
- {
- WriteProcessMemory(phandle, (void*)imm, &imm2, sizeof(imm2),0); //BP
- //WriteProcessMemory(phandle, (void*)address2, &test, sizeof(test),0); // === hp auf 33
- }
- if(GetAsyncKeyState(VK_F3))
- {
- WriteProcessMemory(phandle, (void*)imm, &imm1, sizeof(imm1),0); //BP
- //WriteProcessMemory(phandle, (void*)address2, &test, sizeof(test),0); // === hp auf 33
- }
- }
- Sleep(1000);
- }
- }
- }
Add Comment
Please, Sign In to add comment