Advertisement
Guest User

asdasdas

a guest
Aug 9th, 2015
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.01 KB | None | 0 0
  1. void CheatESP()
  2. {
  3.     int MyTeam = g_pEngine->ClientList[g_pEngine->CG->ClientNumber].Team;
  4.  
  5.     for (int i = 0; i < PLAYERMAX; ++i)
  6.     {
  7.         if (IsBadReadPtr(&g_pEngine->EntityList[i], sizeof(Entity_t)))
  8.             continue;
  9.  
  10.         if (g_pEngine->EntityList[i].Type != ET_PLAYER)
  11.             continue;
  12.  
  13.         if (g_pEngine->CG->ClientNumber == g_pEngine->EntityList[i].ClientNum)
  14.             continue;
  15.  
  16.         bool isEnemy = (MyTeam != g_pEngine->ClientList[i].Team);
  17.  
  18.         if (isEnemy)
  19.         {
  20.             w2s_t* calc = g_pEngine->GetW2SCalc();
  21.  
  22.             float screen[2];
  23.             if (g_pEngine->WorldToScreen(0, calc, g_pEngine->EntityList[i].Origin, screen))
  24.             {
  25.  
  26.                 float* origin = g_pEngine->EntityList[i].Origin;
  27.                
  28.                 char t[255];
  29.                 sprintf(t, "Enemy (Screen: %f %f) (Origin %f %f %f)", screen[0], screen[1], origin[0], origin[1], origin[2]);
  30.                 MessageBox(0, t, 0, 0);
  31.  
  32.                 g_pDraw->DrawString(false, 10, 100 + i * 15, new color_s(0, 255, 0, 255), "Enemy (Screen: %f %f) (Origin %f %f %f)", screen[0], screen[1], origin[0], origin[1], origin[2]);
  33.             }
  34.         }
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement