Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void CEsp::NameESP()
- {
- for(int i = 0; i < cgs->maxPlayers; i++) {
- centity_t pEntity = cg_entities[i];
- clientInfo_t pPlayer = clientinfo[i];
- if((pEntity.clientNum == cg->clientNum))
- continue;
- if((!pEntity.currentValid))
- continue;
- if((pEntity.eType != TYPE_HUMAN) || (!pEntity.isAlive))
- continue;
- vec3_t vOutHead;
- Math.GetPlayerTag(Math.ASM_RegisterTag("j_head", 1, 7), &cg_entities[i], vOutHead);
- float * TeamColor =(clientinfo[cg->clientNum].Team != pPlayer.Team || pPlayer.Team == TEAM_ENEMIES ? colGreen : colRed);
- float fScreenXhead, fScreenYhead;
- if(Math.WorldToScreen(vOutHead, &fScreenXhead, &fScreenYhead) && Math.WorldToScreen(pEntity.lerpOrigin, &fScreenXfeet, &fScreenYfeet)) {
- Drawing.DrawString(fScreenXhead,fScreenYhead - 5, consoleFont, 1.1f, TeamColor, pPlayer.Name);
- /* if (clientinfo[cg->clientNum].Team != pPlayer.Team || pPlayer.Team == TEAM_ENEMIES) // Enemy ESP
- {
- Drawing.DrawString(fScreenXhead,fScreenYhead - 5, consoleFont, 1.1f, TeamColor, pPlayer.Name);
- }
- if (clientinfo[cg->clientNum].Team == pPlayer.Team && pPlayer.Team != TEAM_FFA) // Friend ESP
- {
- Drawing.DrawString(fScreenXhead,fScreenYhead - 5, consoleFont, 1.1f, TeamColor, pPlayer.Name);*/
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment