#define PlayerByIndex 0x37151B40 #define LocalPlayer 0x371529C0 #define DrawPrimitive 0x90ff48 #define PlayerByIndex 0x37151B40 #define Clientinfo 0x3779CDAC #define ClientInfoMgr 0x3779CDAC #define PlayerMgr 0x377DEA34
//Recomendo criarem 1 arquivo .h em branco e colocar o codigo para organizar melhor ;)
class cPlayerInfo{
public:
char _0x0000[4];
__int32 Index; //0x0004
char _0x0008[8];
char pName[12]; //0x0010
char _0x001C[12];
int* Object; //0x0028
__int32 pKills; //0x002C
__int32 pDeaths; //0x0030
char _0x0034[48];
__int32 pFTMission; //0x0064 FireTeam Misson
char _0x0068[8];
__int32 pTeam; //0x0070
char _0x0074[4];
BYTE pIsDead; //0x0078
char _0x0079[307];
__int32 pRank; //0x01AC
char _0x01B0[80];
float llort = [12 || 64];
__int32 pFTScore; //0x0200 FiteTeam Score
char _0x0204[4];
__int32 pFTLongestLife; //0x0208 FireTeam LongestLife : Value / 60 = time
DWORD 2llort = [15];
__int32 pFTKill; //0x020C FireTeam Kill score
char _0x0210[80];
CHAR 2llort = [10 || 54];
cPlayerInfo* PlayerNext; //0x0260
};
class _Object
{
public:
char Pad[4];
D3DXVECTOR3 origin;
};
class cCharacterFX
{
public:
char unk1[16];
int* Object; //0x10
char unk2[44];
int IsPlayer; //0x40
char unk3[40];
unsigned char Index; //0x6C
char unknown112[8]; //0x0070
float fStartPitch; //0x0078
float fStartYaw; //0x007C
char unknown128[1224]; //0x0080
BYTE unk1287; //0x0548
bool bIsDead; //0x0549
bool bSpawnSheild; //0x054A
BYTE unk5563; //0x054B
char unknown1356[12]; //0x054C
int* hHitbox; //0x0558
char unknown1372[96]; //0x055C
WORD wUnk; //0x05BC
WORD wHealth; //0x05BE
WORD wArmor; //0x05C0
};
class cPlayerMgr
{
public:
char pad[24];
cClientWeaponMgr* WeaponMgr; //0018
char unknown0[48];
float Pitch; //0048
float Yaw; //004C
float Roll;
char unknown3[220];
int* CameraObject; //012C
};
DWORD dwClientFxEntry;
#define ADDR_CLIENTFX 0x66F34
LPDIRECT3DDEVICE9 pDevice;
typedef cPlayerInfo* (__thiscall *lpGetPlayerByIndex)(unsigned long ulThis,int index, int unk);
lpGetPlayerByIndex GetPlayerByIndex; //0x3715DD10
cPlayerMgr* pPlayerManager;
typedef cPlayerInfo* (__thiscall *lpGetLocalPlayer)(unsigned long ulThis);
lpGetLocalPlayer GetLocalPlayer;
D3DXVECTOR3 MyGetObjectMaxPos( int* obj ) // i had to change it from int* obj to that because it gave me errors boh1
{
return *(D3DXVECTOR3*)( obj + 0x4 );// change back i gotta go work out be back in 40 k
}
float FindDistance(D3DXVECTOR3 my,D3DXVECTOR3 other,cPlayerInfo* pPlayer,cPlayerInfo* pLocal)
{
return sqrt(((MyGetObjectMaxPos(pLocal->Object)).x-(MyGetObjectMaxPos(pPlayer->Object)).x)*((MyGetObjectMaxPos(pLocal->Object)).x-(MyGetObjectMaxPos(pPlayer->Object)).x) + ((MyGetObjectMaxPos(pLocal->Object)).y-(MyGetObjectMaxPos(pPlayer->Object)).y)*((MyGetObjectMaxPos(pLocal->Object)).y-(MyGetObjectMaxPos(pPlayer->Object)).y) + ((MyGetObjectMaxPos(pLocal->Object)).z-(MyGetObjectMaxPos(pPlayer->Object)).z)*((MyGetObjectMaxPos(pLocal->Object)).z-(MyGetObjectMaxPos(pPlayer->Object)).z));
}
void AngleVectors( const float* angles, float* forward, float* right, float* up )
{
float angle;
static float sr, sp, sy, cr, cp, cy, t;
angle = angles[YAW];
sy = sin(angle);
cy = cos(angle);
angle = angles[PITCH];
sp = sin(angle);
cp = cos(angle);
angle = angles[ROLL];
sr = sin(angle);
cr = cos(angle);
if( forward )
{
forward[0] = cp*cy;
forward[1] = cp*sy;
forward[2] = -sp;
}
if( right )
{
t = sr*sp;
right[0] = ( -1*t*cy+-1*cr*-sy );
right[1] = ( -1*t*sy+-1*cr*cy );
right[2] = -1*sr*cp;
}
if( up )
{
t = cr*sp;
up[0] = ( t*cy+-sr*-sy );
up[1] = ( t*sy+-sr*cy );
up[2] = cr*cp;
}
}
void VectorAngles( const float* forward, float* angles )
{
float tmp, yaw, pitch;
if( forward[2] == 0 && forward[0] == 0 )
{
yaw = 0;
if( forward[2] > 0 )
pitch = 90;
else
pitch = 270;
}
else
{
yaw = ( atan2( forward[2], -forward[0] ) * 180 / M_PI )-90;
if( yaw < 0 )
yaw += 360; //yaw += 360;
tmp = sqrt( forward[0] * forward[0] + forward[2] * forward[2] );
pitch = ( atan2( forward[1], tmp) * 180 / M_PI );
if( pitch < 0 )
pitch += 360; //pitch += 360;
}
angles[0] = -pitch;
angles[1] = yaw;
angles[2] = 0;
}
void GetAngleToTarget(D3DXVECTOR3 vTargetPos, D3DXVECTOR3 vCameraPos, D3DXVECTOR3& vAngles)
{
BYTE aA;
CONST BYTE *AA;
INT B;
D3DXVECTOR3 vDelta;
vDelta.x = vTargetPos.x - vCameraPos.x;
vDelta.y = vTargetPos.y - vCameraPos.y;
vDelta.z = vTargetPos.z - vCameraPos.z;
VectorAngles( (float*)&vDelta, (float*)&vAngles );
if( vAngles.x > 180.0f )
vAngles.x -= 360.0f;
else if( vAngles.x < -180.0f )
vAngles.x += 360.0f;
if( vAngles.y > 180.0f )
vAngles.y -= 360.0f;
else if( vAngles.y < -180.0f )
vAngles.y += 360.0f;
}
int GetClosestPlayer()
{
BYTE A;
CONST BYTE *AA;
INT B;
float fNearest = (float)INT_MAX;
int iAimAt = -1;
typedef cPlayerInfo* (__thiscall *lpGetPlayerByIndex)(unsigned long ulThis,int index, int unk);
lpGetPlayerByIndex GetPlayerByIndex;
GetPlayerByIndex = (lpGetPlayerByIndex)(0x37151B40);
unsigned long ulThis = *(unsigned long*)(0x3779CDAC);
typedef cPlayerInfo* (__thiscall *lpGetLocalPlayer)(unsigned long ulThis);
lpGetLocalPlayer GetLocalPlayer;
GetLocalPlayer = (lpGetLocalPlayer)(0x371529C0);
for ( int i = 0; i < 16; i++ )
{
D3DXVECTOR3 Pos, MyPos;
cPlayerInfo* pPlayer = GetPlayerByIndex( ulThis,i,0);
cPlayerInfo* pLocal = GetLocalPlayer(ulThis);
if(pPlayer != 0 && pLocal != 0 && pLocal->Object != 0 && pPlayer->Object != 0 && pPlayer->pIsDead == 0 && pPlayer->Index != pLocal->Index)
{
if(pLocal->pTeam != pPlayer->pTeam)
{
Pos = MyGetObjectMaxPos(pPlayer->Object);
MyPos = MyGetObjectMaxPos(pLocal->Object);
if(((FindDistance(MyPos,Pos,pPlayer,pLocal))/100) < fNearest )//dis :D
{
// if(!Parede.noobie && !Parede.aimdelay) { //Mudar aki...
iAimAt = i;
fNearest = (FindDistance(MyPos,Pos,pPlayer,pLocal))/100;
// }
}
}
}
}
return iAimAt;
}

if((*(BYTE *)GameStatus == 1) && aimbot) {
int i = GetClosestPlayer();
pPlayerManager = *(cPlayerMgr**)0x3793948C;
GetPlayerByIndex = (lpGetPlayerByIndex)(0x37151500);
unsigned long ulThis = *(unsigned long*)(0x378F4A8C);
GetLocalPlayer = (lpGetLocalPlayer)(0x371520C0);
cPlayerInfo* pLocal = GetLocalPlayer(ulThis);
if(i != -1){
cPlayerInfo* pPlayer = GetPlayerByIndex( ulThis,i,0);
// cPlayerInfo* pLocal = GetLocalPlayer(ulThis);
D3DXVECTOR3 Position;
GetAngleToTarget( (MyGetObjectMaxPos(pPlayer->Object)), (MyGetObjectMaxPos(pLocal->Object)), Position );
pPlayerManager->Yaw = DegToRad( Position[YAW] );
pPlayerManager->Pitch = DegToRad( Position[PITCH] );
}
break;
}
}
}



// Defines do Aimbot #define M_PI 3.14159265358979323846f











