amoreamoreamore
Active member
Hey there. I just want to translate this code for external use. I'm pretty sure I'm doing everything right, but it doesn't work. Also, I am concerned that I have not written anything to Write Process Memory, but what could be written here? I really dk what is missing.
P.S. Internal way works good
Internal, from Nilmer multicheat
My
P.S. Internal way works good
Internal, from Nilmer multicheat
C++:
int wID;
wID = *(BYTE*)0xBAA410;
DWORD* pActor = (DWORD*)0xB6F5F0;//pointer of player actor
DWORD* pPed = (DWORD*)((*pActor) + 0x79C);//pointer to target player
DWORD* pMtrx2 = (DWORD*)((*pPed) + 0x14);//matrix of target player
float* playerHP = (float*)((*pPed) + 0x540);//health of target player
DWORD* pMtrx1 = (DWORD*)((*pActor) + 0x14);//matrix of player actor
if (wID == 24)
{
if (*pPed > 0)
{
if (*playerHP > 0.0f)
{
float* x = (float*)((*pMtrx1) + 0x30);//X position Ped
float* y = (float*)((*pMtrx1) + 0x34);//Y position Ped
float* z = (float*)((*pMtrx1) + 0x38);//Z position Ped
float* x1 = (float*)((*pMtrx2) + 0x30);//X position Target
float* y1 = (float*)((*pMtrx2) + 0x34);//Y position Target
float* z1 = (float*)((*pMtrx2) + 0x38);//Z position Target
float* RotAngle = (float*)((*pActor) + 0x558);//health of target player
float Xwiping = (float)*x + 2 * (float)cos(*RotAngle + 1.48353F);
float Ywiping = (float)*y + 2 * (float)sin(*RotAngle + 1.48353F);
float Zwiping = (float)*z + 0.5F;
*x1 = (float)Xwiping;
*y1 = (float)Ywiping;
*z1 = (float)Zwiping;
}
}
}
My
C++:
int wID;
DWORD pActor, pPed, pMtrx1, pMtrx2;
float PlayerHP;
ReadProcessMemory(hProcess, (LPVOID)0xB6F5F0, &pActor, sizeof(pActor), 0);
ReadProcessMemory(hProcess, (LPVOID)0xBAA410, &wID, sizeof(wID), 0);
ReadProcessMemory(hProcess, (LPVOID)(pActor + 0x79C), &pPed, sizeof(pPed), 0);
ReadProcessMemory(hProcess, (LPVOID)(pPed + 0x14), &pMtrx2, sizeof(pMtrx2), 0);
ReadProcessMemory(hProcess, (LPVOID)(pPed + 0x540), &PlayerHP, sizeof(PlayerHP), 0);
ReadProcessMemory(hProcess, (LPVOID)(pActor + 0x14), &pMtrx1, sizeof(pMtrx1), 0);
if (wID == 24)
{
if (pPed > 0)
{
if (PlayerHP > 0.0f)
{
float x, y, z, x1, y1, z1, RotAngle;
ReadProcessMemory(hProcess, (LPVOID)(pMtrx1 + 0x30), &x, sizeof(x), 0);
ReadProcessMemory(hProcess, (LPVOID)(pMtrx1 + 0x34), &y, sizeof(y), 0);
ReadProcessMemory(hProcess, (LPVOID)(pMtrx1 + 0x38), &z, sizeof(z), 0);
ReadProcessMemory(hProcess, (LPVOID)(pMtrx2 + 0x30), &x1, sizeof(x1), 0);
ReadProcessMemory(hProcess, (LPVOID)(pMtrx2 + 0x34), &y1, sizeof(y1), 0);
ReadProcessMemory(hProcess, (LPVOID)(pMtrx2 + 0x38), &z1, sizeof(z1), 0);
ReadProcessMemory(hProcess, (LPVOID)(pActor + 0x558), &RotAngle, sizeof(RotAngle), 0);
float Xwiping = x + 2 * cos(RotAngle + 1.48353f);
float Ywiping = y + 2 * sin(RotAngle + 1.48353f);
float Zwiping = z + 0.5f;
x1 = Xwiping;
y1 = Ywiping;
z1 = Zwiping;
}
}
}
}