can anyone help me , the game version is 0.50 and everytime the second RPM call is failling, GetLastError says
ERROR_PARTIAL_COPY
299 (0x12B)
Only part of a ReadProcessMemory or WriteProcessMemory request was completed.
ive also used
Code:
HANDLE hToken;
TOKEN_PRIVILEGES tkp;
if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
{
LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &tkp.Privileges[0].Luid);
tkp.PrivilegeCount = 1;
tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
AdjustTokenPrivileges(hToken, 0, &tkp, sizeof(tkp), NULL, NULL);
}
Code:
void RpmFunc(HANDLE hProcess)
{
//this is a ptr to "world", an instance of CWorld - ITS NOT CALLED 'base'
const uintptr_t pWorld = 0xFB1710;
//we could read the entire "world" as a structure of an object, but for this tutorial we don't want that.
//the first address of the structure is enough for this purpose
uintptr_t oWorld;
if (!ReadProcessMemory(hProcess, (void*)pWorld, &oWorld, sizeof(uintptr_t) /*this is why uintptr_t is better than DWORD*/, nullptr /*fuck that*/))
{
//ReadProcessMemory returned false, do something
//usually not necessary because it shouldn't happen if you do your shit right
}
else
{
std::cout << "oWorld is valid" << std::endl;
}
//this is the offset to "entitiesDistributed", not objTable or whatever the fuck you trolls call it
//it's also very likely to change after an update, people who are not lazy as fuck will hand it to you in the base & offset thread - read carefully!
const uint16_t offsetEntitiesDistributed = 0x768;
//somewhere in this huge "world" object there's a ptr to a table that holds all the entities (not all of them, players and zombies and shit tho)
//we are going to read that table - the correct way
uintptr_t pEntitiesDistributed;
if (!ReadProcessMemory(hProcess, (void*)(oWorld + offsetEntitiesDistributed), &pEntitiesDistributed, sizeof(uintptr_t), nullptr))
{
//...
std::cout << "pEntitiesDistributed failed" << " " << GetLastError() << std::endl;
}
else
{
std::cout << "pEntitiesDistributed" << " " << pEntitiesDistributed << std::endl;
}
system("pause");
}