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 <winuser.h>
- #include <cstdlib>
- #include <iostream>
- #include <conio.h>
- #include <stdlib.h>
- #pragma comment( lib, "Msimg32.lib" )
- #pragma comment(lib, "user32.lib")
- #pragma comment(lib, "Kernel32.lib")
- #define WIN32_LEAN_AND_MEAN
- using namespace System;
- using namespace std;
- // VARIABLEN
- DWORD weather = 0xC81320; // Wetter Memory Address
- DWORD cpedaddr = 0xB6F5F0; // CPed-Pointer Memory Address
- DWORD offset2 = 0x42; //Offset für Immunities
- DWORD cped; //Inhalt von cpedaddr - Pointer
- DWORD imm; // CPed+offset2 ||-> Immunities Memory Address
- DWORD imm1; // Ausgangswert Immunities (ALL OFF)
- DWORD imm2; // imm1 + 4 = Bulletproof
- DWORD weather2 = 17; // WetterID, auf die gewechselt werden soll
- DWORD pid; //processId
- HWND hwnd; //Handle
- //--------------------------
- void gtacheck()
- {
- gtacheckanfang:
- hwnd = FindWindow(NULL,L"GTA:SA:MP");
- if(!hwnd)
- {
- cout <<"===============================\n";
- cout <<"|| gta_sa.exe not found! ||\n";
- cout <<"|| Please start GTA:SA:MP ||\n";
- cout <<"===============================\n";
- while(!hwnd)
- {
- hwnd = FindWindow(NULL,L"GTA:SA:MP");
- Sleep(100);
- }
- goto gtacheckanfang;
- }
- else
- {
- GetWindowThreadProcessId(hwnd,&pid);
- HANDLE phandle = OpenProcess(PROCESS_ALL_ACCESS,0,pid);
- if(!phandle)
- {
- cout <<"Could not get handle!\n";
- cin.get();
- }
- else
- {
- cout <<"|| gta_sa.exe found! ||\n";
- cout <<"|| Enjoy! ||\n";
- cout <<"===============================\n";
- }
- }
- }
- void hauptreadmemory()
- {
- GetWindowThreadProcessId(hwnd,&pid);
- HANDLE phandle = OpenProcess(PROCESS_ALL_ACCESS,0,pid);
- //Pointer CPed
- ReadProcessMemory(phandle,(void*)cpedaddr,&cped,sizeof(cped),0);
- //Immunities
- imm = cped+offset2;
- ReadProcessMemory(phandle,(void*)imm,&imm1,sizeof(imm1),0);
- imm2 = imm1+4; //BP +4
- //Wetter
- //HP
- //Armour
- //Geld
- }
- void bptoggle()
- {
- GetWindowThreadProcessId(hwnd,&pid);
- HANDLE phandle = OpenProcess(PROCESS_ALL_ACCESS,0,pid);
- if(GetAsyncKeyState(VK_F2))
- {
- WriteProcessMemory(phandle, (void*)imm, &imm2, sizeof(imm2),0); //BP
- cout <<"|| Schummeln an! ||\n";
- cout <<"===============================\n";
- Sleep(200);
- }
- if(GetAsyncKeyState(VK_F3))
- {
- WriteProcessMemory(phandle, (void*)imm, &imm1, sizeof(imm1),0); //BP OFF
- cout <<"|| Schummeln aus! ||\n";
- cout <<"===============================\n";
- Sleep(200);
- }
- }
- void wettercheat()
- {
- GetWindowThreadProcessId(hwnd,&pid);
- HANDLE phandle = OpenProcess(PROCESS_ALL_ACCESS,0,pid);
- if(GetAsyncKeyState(VK_F5))
- {
- WriteProcessMemory(phandle, (void*)weather ,&weather2, sizeof(weather2),0);
- cout <<"|| Schoenes Wetter! ||\n";
- cout <<"===============================\n";
- Sleep(200);
- }
- }
- void byebye()
- {
- if(!FindWindow(NULL,L"GTA:SA:MP" ) )
- {
- cout <<"|| Bye Bye ||\n";
- cout <<"===============================\n";
- Sleep(750);
- MessageBox(NULL, L"Du hast GTA geschlossen!\npeterL zieht sich in seinen Bauwagen zurück.", L"peterL is not amused.", MB_ICONERROR);
- return;
- }
- }
- void main()
- {
- gtacheck();
- hauptreadmemory();
- while(1)
- {
- bptoggle();
- wettercheat();
- byebye();
- }
- }
Add Comment
Please, Sign In to add comment