DrawBone
Code:
void DrawBone( int StartBone, int EndBone, IClientEntity* target, Color drawCol )
{
Vector StartBonePos, EndBonePos;
Vector StartDrawPos, EndDrawPos;
if(!target)
return;
StartBonePos =GetBonePos(target, StartBone);
EndBonePos = GetBonePos(target, EndBone);
if(!WorldToScreen(StartBonePos, StartDrawPos))
return;
if(!WorldToScreen(EndBonePos, EndDrawPos))
return;
pSurface->DrawSetColor( drawCol );
pSurface->DrawLine( StartDrawPos.x, StartDrawPos.y, EndDrawPos.x, EndDrawPos.y );
}
In Your ESP
Code:
static BYTE iBoneLegL[] = { 24, 23, 22, 1 };
static BYTE iBoneLegR[] = { 27, 26, 25, 1 };
static BYTE iBoneBody[] = { 5, 4, 3, 2, 1 };
static BYTE iBoneArmL[] = { 9, 8, 7, 5 };
static BYTE iBoneArmR[] = { 15, 14, 13, 5 };
for(int i = 0; i < 4; i++)
{
DrawBone(iBoneBody[i], iBoneBody[i+1], pBaseEntity, espColor);
}
for(int i = 0; i < 3; i++)
{
DrawBone(iBoneLegL[i], iBoneLegL[i+1], pBaseEntity, espColor);
DrawBone(iBoneLegR[i], iBoneLegR[i+1], pBaseEntity, espColor);
DrawBone(iBoneArmL[i], iBoneArmL[i+1], pBaseEntity, espColor);
DrawBone(iBoneArmR[i], iBoneArmR[i+1], pBaseEntity, espColor);
}
credits: Graham, Walt, Fergus