amoreamoreamore
Active member
This offsets works for 0.3.7 R1, R2, R3:
This offsets for 0.3.DL:
Enable:
Disable:
Get samp.dll address:
C++:
#define SAMP_INFO 0x21A0F8
#define SAMP_SETTINGS 0x3C5
C++:
#define SAMP_INFO 0x2ACA24
#define SAMP_SETTINGS 0x3D5
C++:
DWORD pInfo;
uint32_t pSettings;
unsigned char ShowNameTags = 1;
unsigned char ThroughWalls = 0;
float fDistance = 999.0f; //Distance
ReadProcessMemory(hProcess, (LPVOID)(moduleBase + SAMP_INFO), &pInfo, sizeof(pInfo), nullptr);
ReadProcessMemory(hProcess, (LPVOID)(pInfo + SAMP_SETTINGS), &pSettings, sizeof(pSettings), NULL);
WriteProcessMemory(hProcess, (LPVOID)(pSettings + 0x38), &ShowNameTags, sizeof(ShowNameTags), nullptr);
WriteProcessMemory(hProcess, (LPVOID)(pSettings + 0x2F), &ThroughWalls, sizeof(ThroughWalls), nullptr);
WriteProcessMemory(hProcess, (LPVOID)(pSettings + 0x27), &fDistance, sizeof(fDistance), nullptr);
C++:
DWORD pInfo;
uint32_t pSettings;
unsigned char ShowNameTags = 1;
unsigned char ThroughWalls = 1;
float fDistance = 100.0f; //Distance
ReadProcessMemory(hProcess, (LPVOID)(moduleBase + SAMP_INFO), &pInfo, sizeof(pInfo), nullptr);
ReadProcessMemory(hProcess, (LPVOID)(pInfo + SAMP_SETTINGS), &pSettings, sizeof(pSettings), NULL);
WriteProcessMemory(hProcess, (LPVOID)(pSettings + 0x38), &ShowNameTags, sizeof(ShowNameTags), nullptr);
WriteProcessMemory(hProcess, (LPVOID)(pSettings + 0x2F), &ThroughWalls, sizeof(ThroughWalls), nullptr);
WriteProcessMemory(hProcess, (LPVOID)(pSettings + 0x27), &fDistance, sizeof(fDistance), nullptr);
Get samp.dll address:
C++:
#pragma once
#include <Windows.h>
#include <TlHelp32.h>
#pragma comment(lib, "User32.lib")
DWORD GetProcId(const wchar_t* procName)
{
{
DWORD procId = 0;
HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if (hSnap != INVALID_HANDLE_VALUE)
{
PROCESSENTRY32 procEntry;
procEntry.dwSize = sizeof(procEntry);
if (Process32First(hSnap, &procEntry))
{
do
{
if (!wcscmp(procEntry.szExeFile, procName))
{
procId = procEntry.th32ProcessID;
break;
}
} while (Process32Next(hSnap, &procEntry));
}
}
CloseHandle(hSnap);
return procId;
}
}
uintptr_t GetModuleBaseAddress(DWORD procId, const wchar_t* modName)
{
{
uintptr_t modBaseAddr = 0;
HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, procId);
if (hSnap != INVALID_HANDLE_VALUE)
{
MODULEENTRY32 modEntry;
modEntry.dwSize = sizeof(modEntry);
if (Module32First(hSnap, &modEntry))
{
do
{
if (!wcscmp(modEntry.szModule, modName))
{
modBaseAddr = (uintptr_t)modEntry.modBaseAddr;
break;
}
} while (Module32Next(hSnap, &modEntry));
}
}
CloseHandle(hSnap);
return modBaseAddr;
}
}
uintptr_t moduleBase = GetModuleBaseAddress(GetProcId(L"gta_sa.exe"), L"samp.dll");
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, NULL, GetProcId(L"gta_sa.exe"));
template<typename T> T RPM(SIZE_T address)
{
//The buffer for data that is going to be read from memory
T buffer;
//The actual RPM
ReadProcessMemory(hProcess, (LPCVOID)address, &buffer, sizeof(T), NULL);
//Return our buffer
return buffer;
}
Last edited: