#include <iostream>
#include <math.h>
#include <stdio.h>
#include <windows.h>
#include <tlhelp32.h>
using namespace std;
int main()
{
SetConsoleTitle("FreezeRotation.eXe by Opcode.eXe");
cout << "FreezeRotation - makes your car hard like 0x688 nipples!" << endl;
cout << "Looking for GTA:SA:MP window." << endl;
// MA VARIABLES
DWORD pId;
DWORD dwOldProtect = 0;
HANDLE pHandle;
HWND hWnd = 0;
DWORD vpointer = 0;
DWORD collflags;
DWORD spin;
BYTE inair;
float zero = 0.0;
while(hWnd == 0){
hWnd = FindWindow(0, "GTA:SA:MP");
Sleep(100);
}
cout << "Just found the window. FreezeRotation has been started." << endl;
GetWindowThreadProcessId(hWnd, &pId);
pHandle = OpenProcess(PROCESS_ALL_ACCESS|PROCESS_VM_OPERATION, TRUE, pId);
while(true){
ReadProcessMemory(pHandle, (LPCVOID)0xBA18FC, &vpointer, 4, 0);
if(vpointer >= 1)
{
collflags = vpointer + 185;
ReadProcessMemory(pHandle, (LPCVOID)collflags, &inair, 1, 0);
if(inair == false){
WriteProcessMemory(pHandle, (LPVOID)(vpointer + 0x50), (LPVOID)&zero, 4, NULL);
WriteProcessMemory(pHandle, (LPVOID)(vpointer + 0x50 + 4), (LPVOID)&zero, 4, NULL);
WriteProcessMemory(pHandle, (LPVOID)(vpointer + 0x50 + 8), (LPVOID)&zero, 4, NULL);
}
}
Sleep(10);
}
CloseHandle(pHandle);
return 0;
}