DWORD _Base = (DWORD)GetModuleHandle("game.exe");
DWORD tmBase = _Base + 0x7FCE40;
DWORD _angle = _Base + 0x7F1484;
DWORD _CamPos = _Base + 0x7F148C;
DWORD cBone = _Base + 0x1720A0;
DWORD GAbase = _Base + 0x7C969C;
class _Angle
{
public:
char _0x1[0x2CC];
float ySub;
float Yaxis;
char _0x001[0xB4];
float Xaxis;
};
class cSkeleton
{
public:
char _0x0000[0x80];
D3DXVECTOR3 BoneCords; // 0x80
};
class CgameBase
{
public:
char _0x0004[0xB57C];
int Index; // 0xB57C
int GameType; // 0xB580
int _0x0045;// 0xB584
int Rounds; // 0xB588
};
class PlayerLoop
{
public:
char _0x01[0x1C48F0];
int lctnView;
int none1;
int none2;
int isAlive;
};
class __PLR
{
public:
_Angle* AAAngle()
{
return *(_Angle**)(_angle);
}
D3DXVECTOR3 MyCamPos = *(D3DXVECTOR3*)_CamPos;
DWORD PlayerIndex(int i)
{
DWORD result = *(PDWORD)tmBase;
if (!result)
return 0;
result = *(PDWORD)(result + 0xC);
if (!result)
return 0;
result = *(PDWORD)(result + 0x4);
if (!result)
return 0;
result = *(PDWORD)(result + (i * 4) + 4);
if (!result)
return 0;
result = *(PDWORD)(result + 0x80C);
if (!result)
return 0;
result = *(PDWORD)(result + 0x170);
if (!result)
return 0;
return *(PDWORD)(result + 0x4);
}
CgameBase* GetGameBase()
{
return *(CgameBase**)GAbase;
}
DWORD GetTeamBase()
{
DWORD Ptr1 = *(PDWORD)tmBase;
if (Ptr1 == 0)
return 0;
return Ptr1 = *(PDWORD)(Ptr1 + 0x10);
}
int GetMyIndex()
{
CgameBase* pPlayerBase = GetGameBase();
if (!pPlayerBase)
return 0;
return pPlayerBase->Index;
}
bool isTeammate(int i)
{
int MyPlayer = *(PDWORD)(GetTeamBase() + 4 * GetMyIndex() + 0x548);
int Entity = *(PDWORD)(GetTeamBase() + 4 * i + 0x548);
if (MyPlayer == Entity)
return true;
return false;
}
DWORD PlayerLoopBase()
{
DWORD result = *(PDWORD)tmBase;
if (!result)
return 0;
result = *(PDWORD)(result + 0xC);
if (!result)
return 0;
return *(PDWORD)(result + 0x4);
}
PlayerLoop* GetPlrByLoop(int i)
{
DWORD BasePtr = PlayerLoopBase();
if (BasePtr == 0)
return 0;
return *(PlayerLoop**)(BasePtr + (i * 4) + 4);
}
};
extern __PLR plr;
__PLR plr;
D3DXVECTOR3 _GetBone(int i, LPSTR szBoneName)
{
typedef cSkeleton* (__thiscall* tGetBonePtr)(DWORD, LPSTR);
tGetBonePtr GetBonePtr = (tGetBonePtr)cBone;
cSkeleton *pGetBone = GetBonePtr(plr.PlayerIndex(i), szBoneName);
return pGetBone->BoneCords;
}
void AimToTarget(D3DXVECTOR3 MyPlayer, D3DXVECTOR3 Entity, D3DXVECTOR3 &Aim) // math for who asking for it !
{
double Target[3] = { (MyPlayer.x - Entity.x), (MyPlayer.y - Entity.y), (MyPlayer.z - Entity.z) }; // for x y z
double hyp = sqrt(Target[0] * Target[0] + Target[2] * Target[2]);
Aim.x = (float)(atanf(Target[2] / Target[0]) * -1.0f); // this is for Y_Sub, important !
Aim.y = (float)(asinf(Target[1] / hyp) * 57.29573671972f);
Aim.z = 0.0f; // keep it 0
// Math for map_world.. to fix it here we go..
if (Target[0] >= 0.0) { Aim.x -= 180.0f / 57.29573671972f; }
}
void Aimbot()
{
D3DXVECTOR3 MY_CAM = plr.MyCamPos;
D3DXVECTOR3 i_Aim;
_Angle* MY_Angle = plr.AAAngle();
float xAxis = MY_Angle->Xaxis;
float yAxis = MY_Angle->Yaxis;
float ySub = MY_Angle->ySub;
for (int i = 0; i < 16; i++)
{
PlayerLoop* Players = plr.GetPlrByLoop(i);
if (Players)
{
if (plr.isTeammate(i)) continue; // ignore teammate
if (!Players->isAlive) continue; // ignore deadbody.
if (i == plr.GetMyIndex()) continue; // ignore myplayer.
D3DXVECTOR3 Entity_Head = _GetBone(i, "Bip01 Neck");
if (GetAsyncKeyState(VK_RBUTTON) & 0x8000) // Hotkey for aimbot..
{
AimToTarget(MY_CAM, Entity_Head, i_Aim);
MY_Angle->Xaxis = i_Aim.x;
MY_Angle->Yaxis = i_Aim.y;
MY_Angle->ySub = i_Aim.y * -1; // important !
}
}
}
}
이런 저런 글들을 읽어봐도 너무 어렵네요 ㅜㅜ
[최초 등록일: ]
[최종 수정일: 10/30/2018]