Aimbot
Alguem pode me dizer se esse código de aimbot tá atualizado?
Eu tirei duma base antiga do @Fix2
Aimbot.h
Eu tirei duma base antiga do @Fix2
Aimbot.h
Code:
#define M_PI 3.14159265358979323846f
#define DegToRad( degree ) ( (degree) * (3.141592654f / 180.0f) )
#define PITCH 0
#define YAW 1
#define ROLL 2
#define ADDR_PLAYERMGR 0x379D2F14
#define ADDR_PLAYERBYINDEX 0x371A0A40
#define ADDR_PLAYERSTATUS 0x379B2894
#define ADDR_LOCALPLAYER 0x371A1460
#define ADDR_GCS 0x379D2E30
#define ADDR_CLIENTINFOMGR 0x37994AFC
#define GameStatus 0x379AD7C8
#pragma warning(disable: 4482 4305 4083 4309 C4482 4244 C4002 C4996 )
#pragma warning(disable: 4731 4996 4101 4129 4002 C4996 C4101 C4102 C4102)
#include "class2.h"
int Bones;
int Tecla;
float DistanceAim(D3DXVECTOR3 my,D3DXVECTOR3 other,cPlayerInfo* pPlayer,cPlayerInfo* pLocal)
{
return sqrt(((MyGetObjectMaxPos(pLocal->obj)).x-(MyGetObjectMaxPos(pPlayer->obj)).x)*((MyGetObjectMaxPos(pLocal->obj)).x-(MyGetObjectMaxPos(pPlayer->obj)).x) + ((MyGetObjectMaxPos(pLocal->obj)).y-(MyGetObjectMaxPos(pPlayer->obj)).y)*((MyGetObjectMaxPos(pLocal->obj)).y-(MyGetObjectMaxPos(pPlayer->obj)).y) + ((MyGetObjectMaxPos(pLocal->obj)).z-(MyGetObjectMaxPos(pPlayer->obj)).z)*((MyGetObjectMaxPos(pLocal->obj)).z-(MyGetObjectMaxPos(pPlayer->obj)).z));
}
int GetClosestPlayer()
{
float fNearest = (float) INT_MAX;
int iAimAt = -1;
float Distance;
float fDistPitch = 0;
float fDistYaw = 0;
typedef cPlayerInfo* (__thiscall *lpGetPlayerByIndex)(unsigned long ulThis,int index, int unk);
lpGetPlayerByIndex GetPlayerByIndex;
GetPlayerByIndex = (lpGetPlayerByIndex)(ADDR_PLAYERBYINDEX);
typedef cPlayerInfo* (__thiscall *lpGetLocalPlayer)(unsigned long ulThis);
lpGetLocalPlayer GetLocalPlayer;
GetLocalPlayer = (lpGetLocalPlayer) ADDR_LOCALPLAYER;
unsigned long ulThis = *(unsigned long *) ADDR_CLIENTINFOMGR;
D3DXVECTOR3 Position;
cPlayerInfo* pPlayer;
cPlayerInfo* pLocal;
pPlayerManager = *(cPlayerMgr **) ADDR_PLAYERMGR;
for (int i = 0; i < 16; i++)
{
pPlayer = GetPlayerByIndex(ulThis, i, 0);
pLocal = GetLocalPlayer(ulThis);
if(pPlayer != 0 && pLocal != 0 && pLocal->obj != 0 && pPlayer->obj != 0 && pPlayer->IsDead == 0 && pPlayer->index != pLocal->index)
{
if(pLocal->Team != pPlayer->Team)
{
GetAngleToTarget(ObjConv(pPlayer->obj), ObjConv(pLocal->obj), Position);
fDistPitch = pPlayerManager->Pitch - DegToRad(Position[0]);
fDistYaw = pPlayerManager->Yaw - DegToRad(Position[1]);
Distance = sqrt((fDistPitch * fDistPitch) + (fDistYaw * fDistYaw));
//Distance = FindDistance(pPlayer, pLocal);
//if ((Distance / 100) < fNearest)
if (Distance < fNearest)
{
iAimAt = i;
fNearest = Distance;
//fNearest = (Distance / 100);
}
}
}
}
return iAimAt;
}
void doaimbot() //Cabeça
{
if((*(BYTE *)GameStatus == 1) && Bones == 1){
int i = GetClosestPlayer();
pPlayerManager = *(cPlayerMgr**)(ADDR_PLAYERMGR);
typedef cPlayerInfo* (__thiscall *lpGetPlayerByIndex)(unsigned long ulThis,int index, int unk);
lpGetPlayerByIndex GetPlayerByIndex;
GetPlayerByIndex = (lpGetPlayerByIndex)(ADDR_PLAYERBYINDEX);
unsigned long ulThis = *(unsigned long*)(ADDR_CLIENTINFOMGR);
typedef cPlayerInfo* (__thiscall *lpGetLocalPlayer)(unsigned long ulThis);
lpGetLocalPlayer GetLocalPlayer;
GetLocalPlayer = (lpGetLocalPlayer)(ADDR_LOCALPLAYER);
cPlayerInfo* pLocal = GetLocalPlayer(ulThis);
if(i != -1){
cPlayerInfo* pPlayer = GetPlayerByIndex( ulThis,i,0);
D3DXVECTOR3 Position;
GetAngleToTarget( (MyGetObjectMaxPos(pPlayer->obj)), (MyGetObjectMaxPos(pLocal->obj)), Position );
pPlayerManager->Yaw = DegToRad( Position[YAW] );
pPlayerManager->Pitch = DegToRad( Position[PITCH] );
}
}
}
void doaimbot2() //Peito
{
if((*(BYTE *)GameStatus == 1) && Bones == 2){
int i = GetClosestPlayer();
pPlayerManager = *(cPlayerMgr**)(ADDR_PLAYERMGR);
typedef cPlayerInfo* (__thiscall *lpGetPlayerByIndex)(unsigned long ulThis,int index, int unk);
lpGetPlayerByIndex GetPlayerByIndex;
GetPlayerByIndex = (lpGetPlayerByIndex)(ADDR_PLAYERBYINDEX);
unsigned long ulThis = *(unsigned long*)(ADDR_CLIENTINFOMGR);
typedef cPlayerInfo* (__thiscall *lpGetLocalPlayer)(unsigned long ulThis);
lpGetLocalPlayer GetLocalPlayer;
GetLocalPlayer = (lpGetLocalPlayer)(ADDR_LOCALPLAYER);
cPlayerInfo* pLocal = GetLocalPlayer(ulThis);
if(i != -1){
cPlayerInfo* pPlayer = GetPlayerByIndex( ulThis,i,0);
D3DXVECTOR3 Position;
GetAngleToTarget( (MyGetObjectMaxPos(pPlayer->obj)), (MyGetObjectMaxPos(pLocal->obj)), Position );
pPlayerManager->Yaw = DegToRad( Position[YAW] );
pPlayerManager->Pitch = DegToRad( Position[PITCH] +1 );
}
}
}
void doaimbot3() //Nutshot
{
if((*(BYTE *)GameStatus == 1) && Bones == 3){
int i = GetClosestPlayer();
pPlayerManager = *(cPlayerMgr**)(ADDR_PLAYERMGR);
typedef cPlayerInfo* (__thiscall *lpGetPlayerByIndex)(unsigned long ulThis,int index, int unk);
lpGetPlayerByIndex GetPlayerByIndex;
GetPlayerByIndex = (lpGetPlayerByIndex)(ADDR_PLAYERBYINDEX);
unsigned long ulThis = *(unsigned long*)(ADDR_CLIENTINFOMGR);
typedef cPlayerInfo* (__thiscall *lpGetLocalPlayer)(unsigned long ulThis);
lpGetLocalPlayer GetLocalPlayer;
GetLocalPlayer = (lpGetLocalPlayer)(ADDR_LOCALPLAYER);
cPlayerInfo* pLocal = GetLocalPlayer(ulThis);
if(i != -1){
cPlayerInfo* pPlayer = GetPlayerByIndex( ulThis,i,0);
D3DXVECTOR3 Position;
GetAngleToTarget( (MyGetObjectMaxPos(pPlayer->obj)), (MyGetObjectMaxPos(pLocal->obj)), Position );
pPlayerManager->Yaw = DegToRad( Position[YAW] );
pPlayerManager->Pitch = DegToRad( Position[PITCH] +5,2 );
}
}
}

pedef bool (*ObjectFilterFnCA)(int* hObj, void* pUserData);
