Hello guys, I have a little problem long time ago. First I posted in other place why I can't open gta_sa.exe (MTA:SA) with my program-hack and they answered me "Compile your program as 64 bit" because gta_sa.exe is 64 bit process. So I did it but I can't open it yet... How can I open process correctly? I only want to read memory to make ESP or something like that... Here my little code:
Code:
#include <stdio.h>
#include <string>
#include <algorithm>
#include <math.h>
#include <iostream>
#include <conio.h>
#include <windows.h>
#include <stdlib.h>
#include <time.h>
#include <sstream>
using namespace std;
int main()
{
DWORD address = 0;
int money = 0;
HWND hWnd = FindWindow(0, (LPCSTR)"MTA: San Andreas");
if (hWnd == 0)
{
cout << "WINDOW NOT FOUND!" << endl;
return 0;
}
DWORD pId;
GetWindowThreadProcessId(hWnd, &pId);
HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pId);
if (!hProc)
{
cout << "Couldn't open the process!" << endl;
system("pause");
return 0;
}
cout << "OPENED!" << endl;
while (true)
{
//address++;
if (ReadProcessMemory(hProc, (LPVOID)address, &money, sizeof(int), 0))
{
//int money = mem.Read<int>(mem.Module("gta_sa.exe") + 0x77CE50);
printf("Address: %x - %i\n", address, money);
Sleep(400);
}
}
return 0;
}