Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void CheatESP()
- {
- int MyTeam = g_pEngine->ClientList[g_pEngine->CG->ClientNumber].Team;
- for (int i = 0; i < PLAYERMAX; ++i)
- {
- if (IsBadReadPtr(&g_pEngine->EntityList[i], sizeof(Entity_t)))
- continue;
- if (g_pEngine->EntityList[i].Type != ET_PLAYER)
- continue;
- if (g_pEngine->CG->ClientNumber == g_pEngine->EntityList[i].ClientNum)
- continue;
- bool isEnemy = (MyTeam != g_pEngine->ClientList[i].Team);
- if (isEnemy)
- {
- w2s_t* calc = g_pEngine->GetW2SCalc();
- float screen[2];
- if (g_pEngine->WorldToScreen(0, calc, g_pEngine->EntityList[i].Origin, screen))
- {
- float* origin = g_pEngine->EntityList[i].Origin;
- char t[255];
- sprintf(t, "Enemy (Screen: %f %f) (Origin %f %f %f)", screen[0], screen[1], origin[0], origin[1], origin[2]);
- MessageBox(0, t, 0, 0);
- 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]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement