what's wrong in my code?
why name and health does not lead to players ?
but, the bone esp leads to all players

i use this code for name and health:
i use this code for bone esp :
can you help me?
why name and health does not lead to players ?
but, the bone esp leads to all players
i use this code for name and health:
Code:
void DrawESP(LPDIRECT3DDEVICE9 pDevice)
{
DWORD dwI3EXEC = (DWORD)GetModuleHandleA("PointBlank.exe");
ULONG dwBase = *(DWORD*)(dwI3EXEC + BASEPL);
ULONG dwBase2 = *(DWORD*)(dwI3EXEC + BASEHP);
CTeam *pTeam = ((CTeam*)(dwBase + PTR_TEAM));
D3DVECTOR ScreenPos;
CPlayers *pNearEnt = NULL;
float ScreenCenterX = (Viewport.Width /2.0f);
float ScreenCenterY = (Viewport.Height /2.0f);
float ScreenBottomY = (Viewport.Height);
int MyTeam = GetTeam(pTeam->iTeam);
for (int i = 0; i<=MAXPLAYERS;i++)
{
if (dwBase !=0)
{
CNames *pNames = (CNames*)((dwBase + NAMES_PTR) + i * NAMESIZE);
CPlayers *pPlayer = (CPlayers*)((dwBase + PL_PTR));
CPlayers *pLocal = (CPlayers*)((dwBase + PL_PTR) + pTeam->iTeam);
int iTeam = GetTeam(i);
Player.x = pPlayer->pos.x;
Player.y = pPlayer->pos.y;
Player.z = pPlayer->pos.z;
HeadPos.x = pPlayer->pos.x;
HeadPos.y = 1.5f + pPlayer->pos.y;
HeadPos.z = pPlayer->pos.z;
D3DXVECTOR3 xDistance = pPlayer->pos - pLocal->pos;
D3DXVECTOR3 MyDistance = pLocal->pos - pPlayer->pos;
float xaDistance = D3DXVec3Length(&xDistance );
float MyaDistance = D3DXVec3Length(&MyDistance );
float Nearest = (float) INT_MAX;
float PosX = 0.0f;
float PosY = 0.0f;
if (iTeam == MyTeam)continue;
if (iTeam == 1){ TeamColor = RED; }
else if (iTeam == 2){ TeamColor = GREEN; }
else{ continue; }
if (WorldToScreen(pDevice,HeadPos,HeadScaled)==TRUE)
{
if (pHealth->CurHP > 1)
{
if(cItem.ESPName)
{
FcESP->PrintText(pNames->szNames,(float)HeadScaled.x-20,(float)HeadScaled.y-40,TeamColor,fName);
}
if (cItem.ESPHealth){
FcESP->Healthbarnew(pDevice,(int)HeadScaled.x-25,(int)HeadScaled.y-25,pHealth->CurHP);
}
}
}
}
}
}Code:
void BoneESP (LPDIRECT3DDEVICE9 pDevice)
{
DWORD dwI3EXEC = (DWORD)GetModuleHandle("PointBlank.exe");
unsigned long dwBase = *(DWORD*)(dwI3EXEC + BASEPL);
unsigned long A_CGameCharaManager = *(DWORD*)(dwI3EXEC + BASEHP);
unsigned long dwBase2 = *(DWORD*)(dwI3EXEC + BASEHP);
CTeam *pTeam = ((CTeam*)(dwBase + TEAM_PTR));
CGameCharaBase* m_CharaBase = NULL;
for (int i = 0; i<=MAXPLAYERS;i++)
{
if(A_CGameCharaManager !=0){
m_CharaBase = (CGameCharaBase*)((*(DWORD*)(A_CGameCharaManager + 0x14 + 0x4*i)));
int iTeam = GetTeam(i);
if (iTeam == 1){ TeamColor = ORANGE; }
else if (iTeam == 2){ TeamColor = WHITE; }
else{ continue; }
if(m_CharaBase!=0)
if(m_CharaBase->m_BoneContext!=0){
if(cItem.EspBone == 1){
DrawSkeleton(m_CharaBase, TeamColor, npDevice);
}
}
}
}
}
Aucun commentaire:
Enregistrer un commentaire