This is a simple project developed for fun and to test knowledge. It consists of a program that reads information from the running game GTA: San Andreas.
The program includes functions that return:
- Health / Max Health
- Armor
- Money
- Current Weapon
- Wanted Level
- Location (X, Y, Z, and/or Neighborhood)
float GetPlayerHealth(HANDLE hProcess);
float GetPlayerMaxHealth(HANDLE hProcess);
float GetPlayerArmour(HANDLE hProcess);
float GetPlayerPosition(HANDLE hProcess, float* x, float* y, float* z);
int GetPlayerMoney(HANDLE hProcess);
int GetPlayerWantedLevel(HANDLE hProcess);
int GetPlayerWeapon(HANDLE hProcess);
int GetPlayerVehicle(HANDLE hProcess);
bool IsPlayerInVehicle(HANDLE hProcess);- Make sure that the GTA: San Andreas version is 1.0 and the game is running.
- You need to have CMake installed on your system.
- On Windows, you need to have Visual Studio or MinGW installed.
- On Linux, you need GCC or Clang installed.
git clone https://your-repository.git
cd sa-memory- Create a new build folder inside the project:
mkdir build
cd build- CMake will automatically detect the correct compiler and generate the appropriate build files.
cmake ..- On Windows:
cmake --build . --config Release- On Linux:
make- On Windows, the generated program will be samemory.exe, and on Linux, it will be samemory (without the .exe suffix).
./samemory.exe./samemorySpecial thanks to gtamods, where I found the memory addresses for GTA: San Andreas.