Let's give a secound chance to this forgotten ESP
The source is almost for C+P but not for leecher's
Press Thank's if you leech it
Screen 1.
Screen 2.
Define
Code:
float position_x = 83;
float position_y = 86;
float radius_x = 64;
float radius_y = 64;
const int degrees = 360;
const float degrees_to_radians = 3.14159265f / 180.0f;
bool ESPMyTeam = true /*for draw your team to*/ false to draw only enemy's
DrawBox
Code:
void DrawBox(float X, float Y, float X2, float Y2,D3DCOLOR Color,IDirect3DDevice9* m_pD3Ddev)
{
D3DTLVERTEX qV[2] = {
{ (float)X , (float)Y, 0.0f, 1.0f, Color},
{ (float)X2 , (float)Y2 , 0.0f, 1.0f, Color},
};
const DWORD D3DFVF_TL = D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1;
m_pD3Ddev->SetRenderState( D3DRS_ALPHABLENDENABLE, true );
m_pD3Ddev->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );
m_pD3Ddev->SetFVF( D3DFVF_TL );
m_pD3Ddev->SetTexture( 0, NULL );
m_pD3Ddev->DrawPrimitiveUP( D3DPT_LINELIST, 2, qV, sizeof( D3DTLVERTEX ) );
}
Radar ESP
Code:
void RadarESP(bool both , IDirect3DDevice9* pDevice)
{
MyIndex=GetMyIndex();
if (MyIndex>-1)
{ CPlayer* Me = GetPlayerLoop(MyIndex);
if(Me && Me->Object)
{
DWORD hShell=(DWORD)(GetModuleHandleA_Fix());
DWORD LTClientShel = *(DWORD*)( hShell+0x46E7F8 );
DWORD BASEPLAYER = *(DWORD*)(LTClientShel + 0x54 );
for (int i = 0; i < degrees; i++)
{
const float rad = i * degrees_to_radians;
float x =position_x - (cos(rad) * radius_x);
float y =position_y + (sin(rad) * radius_y);
DrawBox(x,y,x+1,y+1,BLACK,pDevice);
}
D3DRECT back = { position_x-1, position_y-1, position_x + 3, position_y + 3 };
pDevice->Clear( 1, &back, D3DCLEAR_TARGET, WHITE, 0, 0 );
D3DXVECTOR3 Pos2 = GetBonePosition(Me->Object,6);
for(int i=0;i<16;i++)
{
CPlayer* Target = GetPlayerLoop(i);
if (Target && Target->Object && Target->Health>0 && Target!=Me)
{
D3DXVECTOR3 Pos1= GetBonePosition(Target->Object,6);
float part1 = pow((Pos2.x-Pos1.x), 2);
float part2 = pow((Pos2.z-Pos1.z), 2);
float underRadical = part1 + part2;
float result = (float)sqrt(underRadical);
result/=64.4;
float dx = Pos2.x - Pos1.x;
float dy = Pos2.z - Pos1.z;
float yaw = atan2f(dy, dx);
if(result>radius_x)
result=radius_x;
float myYaw=(*(float *)( BASEPLAYER + 0x110));
myYaw*=-1;
myYaw=yaw-myYaw;
const float radb = myYaw;
float x2 =position_x - (cos(radb) * result);
float y2 =position_y + (sin(radb) * result);
D3DRECT back2 = { x2-1,y2-1,x2+3,y2+3};
if(Me->Team!=Target->Team)
pDevice->Clear( 1, &back2, D3DCLEAR_TARGET, RED, 0, 0 );
else if(both)
pDevice->Clear( 1, &back2, D3DCLEAR_TARGET, GREEN, 0, 0 );
}
}
}
}
}
Call
Code:
RadarESP(ESPMyTeam,pDevice)