#include <Windows.h>
#include <tchar.h>
#include <psapi.h>
#include <iostream>
using namespace std;
int main()
{
DWORD ProcessID = 0;
GetProcessID(L"gta_sa.exe", ProcessID);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, NULL, ProcessID);
if (hProcess == NULL)
{
return 1;
}
DWORD MakaneNoSpread = 0x8D610F;
bool Cheragh = false;
char NoSpreadFaalShavad[] = "\xBE\x00\x00\x00\x00";
char NoSpreadGheyreFaalShavad[] = "\xBE\x00\x00\x40\x3F";
cout << "Tire saaf (legit version) for SA:MP/AG:SAL started." << endl;
cout << "Press F9 to activate the No Spread feature.";
for (;;)
{
if (GetAsyncKeyState(VK_F9) & 1)
{
if (!Cheragh) {
WriteProcessMemory(hProcess, (LPVOID)MakaneNoSpread, &NoSpreadFaalShavad, 5, NULL);
cout << "Tire saaf (legit) has been enabled." << endl;
Gheragh = !false;
}
else {
WriteProcessMemory(hProcess, (LPVOID)MakaneNoSpread, &NoSpreadGheyreFaalShavad, 5, NULL);
cout << "Tire saaf (legit) has been disabled." << endl;
Cheragh = !true;
}
}
Sleep(85);
}
}