Advertisement
Guest User

Untitled

a guest
May 14th, 2012
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. void DoEsp(LPDIRECT3DDEVICE9 pDevice)
  2. {
  3. DWORD dwPlayerPtr = *(DWORD*)(ADR_PLAYERPOINTER);
  4. if (dwPlayerPtr !=0 ){
  5.  
  6. for(int i = 0; i < 32; i++)
  7. {
  8. if(!g_pBase->pGlobal || !g_pBase->pLocal) break;
  9. CPlayerInfo* pInfo = GetPlayerInfoByIndex(i);
  10. CPlayer* pPlayer = g_pBase->pGlobal[i];
  11. if(pInfo && pPlayer)
  12. {
  13. CPlayerInfo *pLocalInfo = GetPlayerInfoByIndex(g_pBase->pLocal->bIndex);
  14. D3DXVECTOR3 PlayerView(g_pBase->pGlobal[i]->pos1,g_pBase->pGlobal[i]->pos2,g_pBase->pGlobal[i]->pos3),EspView;
  15. if (espn)
  16. {
  17. if (GetScreenCoordFromWorld(pDevice,EspView,PlayerView))//ur forgetting something..
  18. {
  19. if (espenable)
  20. {
  21. if(AL_EspEnemyOnly && pInfo->iHealth > 0 && pInfo->bTeam != pLocalInfo->bTeam)
  22.  
  23. {
  24. WarESP = D3DCOLOR_ARGB(255,000,191,255);
  25. }
  26. else
  27. {
  28. WarESP = D3DCOLOR_ARGB(255,255,000,000);
  29. }
  30. if( espn )
  31. {
  32. char szname[60];
  33. sprintf(szname,"Name: %s",pInfo->szNickName);
  34. DrawTextC(EspView.x-50,EspView.y-130, WarESP,szname,g_pFont);
  35. EspView.y += 12;
  36. }
  37. }}
  38. }}
  39. }}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement