Originally Posted by
JamesBond
You mean a memory class? You can find one in my signature
Using memory classes for DLL's (internals) is retarded. I mean you can just write to memory like this:
Code:
*(int*)(dwPlayerBase + HealthOffset) = 9999;
and read from memory like this:
Code:
int myHealth = *(int*)(dwPlayerBase + HealthOffset);
I think he wants a hooking base.
@OP I haven't really looked in to MW3 that much but I think that you should be fine just hooking the game with jumphooks (Jump to your function in the middle of a game function). As for a base, write your own as I don't think many bases exists. The player's size is 38EC bytes large in hexadecimals. One strange thing that differs from other games like Counter Strike is that you have the position offset: 0x01C2945C and the player offset is 38EC * index instead of having a entitylist and adding offsets onto the entities bases' like [[[iw5mp.exe + dwEntityList] + 0x38EC * index] + positionoffset] where as "positionoffset" is usually a small number like 0x104 you do it like this:
Code:
Vector3 CEntity::Pos()
{
return *(Vector3*)(DWORD(Offsets::Pos + (this->m_nIndex * 0x38EC)));
}
I don't know if this is normal as I'm new to gamehacking and coding but it's a bit different from other games that I've tried to hack.
A very small "base" I wrote
Code:
class CEntity
{
public:
DWORD Base = 0;
int m_nIndex = 0;
Vector3 Pos();
void GiveNoclip();
CEntity::CEntity(int nIndex);
void CEntity::SetPos(Vector3 Position);
void CEntity::SetUAV();
};
CEntity::CEntity(int nIndex)
{
this->m_nIndex = nIndex;
this->Base = Modules::dwBase + 0x38EC * nIndex;
}
void CEntity::GiveNoclip()
{
}
Vector3 CEntity::Pos()
{
return *(Vector3*)(DWORD(Offsets::Pos + (this->m_nIndex * 0x38EC)));
}
void CEntity::SetPos(Vector3 Position)
{
*(Vector3*)(DWORD(Offsets::Pos + (this->m_nIndex * 0x38EC))) = Position;
}
void CEntity::SetUAV()
{
*(int*)(DWORD(Offsets::UAV + (this->m_nIndex * 0x38EC))) = 1;
}
namespace Offsets
{
DWORD Lazer = 0x47CDF6;
DWORD Stats = 0x18E1078;
DWORD Pos = 0x01C2945C;
DWORD Fov = 0x59E4EC4;
DWORD UAV = 0x1C2C8BC;
DWORD ViewAngles = 0x1061C84;
}
void GiveNoclip(int nIndex)
{
0x01C2C778 + 0x38EC * nIndex;
}
int nGetLocalIndex()
{
return *(int*)0x08FD0F0;
}
bool bIsInGame()
{
return *(bool*)0x08DBD84;
}
void ForceHost()
{
*(int*)(0xC + *(int*)0x132FD24) = 1;
}
void SetFov(float FOV)
{
*(float*)Offsets::Fov = FOV;
}
The CEntity::GiveUAV() is for yourself. I made this very fast and there's probably shit not working.
Example of hack (aimbot is not working but teleport(host-only) and UAV does work):
Code:
while (!bIsInGame())
{
ForceHost();
Sleep(10);
}
pLocal = new CEntity(nGetLocalIndex());
if (GetAsyncKeyState(VK_INSERT) & 1)
savedPos = pLocal->Pos();
if (GetAsyncKeyState(VK_HOME) & 1)
{
pLocal->SetPos(savedPos);
}
SetFov(80);
pLocal->SetUAV();
Sleep(1);
for (int i = 0; i < 18; i++)
{
CEntity *pEntity = new CEntity(i);
if (pEntity->m_nIndex = pLocal->m_nIndex)
continue;
Vector3 AimbotAngle = CalcAngle(pLocal->Pos(), pEntity->Pos());
if (!AimbotAngle.bIsZero())
SetViewAngles(AimbotAngle);
}