Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <Windows.h>
- #include <iostream>
- #define CVehicle 0xB6F980
- using namespace std;
- int _tmain(int argc, _TCHAR* argv[])
- {
- HWND sampWindow = FindWindow(0, _T("GTA:SA:MP"));
- HANDLE hProcess;
- DWORD PID, CVehicleAddress;
- float output;
- if(!sampWindow)
- {
- cout << "SA:MP IS CLOSED!\n";
- cin.get();
- return true;
- }
- else cout << "SA:MP IS OPEN!\n";
- GetWindowThreadProcessId(sampWindow, &PID);
- hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, PID);
- if(!hProcess) cout << "Cannot open process!";
- ReadProcessMemory(hProcess, (void *) CVehicle, &CVehicleAddress, sizeof(CVehicleAddress), NULL);
- ReadProcessMemory(hProcess, (byte *) CVehicleAddress +??????, &output, sizeof(output), NULL);
- cout << "Your fPosZ: " << (float) output << "\n";
- CloseHandle(hProcess);
- cin.get();
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement