Adding: Player List

社区服务
高级搜索
猴岛论坛CSGO反恐精英CS作弊器交流讨论Adding: Player List
发帖 回复
倒序阅读 最近浏览的帖子最近浏览的版块
0个回复

Adding: Player List

楼层直达
作弊辅导员_h

ZxID:1019634

等级: 元老
定做作弊器
举报 只看楼主 使用道具 楼主   发表于: 2007-07-05 0
When i was reading around i read the request from Speedy about how to draw the player list, well here it is, but it's just a base to see how it works

credits go to h1web, cause i used a small part from his "esp base" biggrin.gif, and panzer as usual for his isValidEnt function.

I couldn't test it but it should work, if it doesn't, tell me, leave a msg and tell me what's the problem

just call the drawPlayerList() every 1st viewport

Code:

//================================================================== ================
bool isValidEnt(cl_entity_s *ent)
{
if(ent && (ent != pEngfuncs->GetLocalPlayer())
&& !(ent->curstate.effects & EF_NODRAW)
&& ent->player
&& !ent->curstate.spectator
&& ent->curstate.solid
&& !(ent->curstate.messagenum < pEngfuncs->GetLocalPlayer()->curstate.messagenum))
{
return true;
}
else
return false;
}

// ================================================================================
==
int Team(int i) // 1 is terror , 2 is counter , 3 is all the rest
{
hud_player_info_t pinfo;
cl_entity_t *pMe = pEngfuncs->GetLocalPlayer();

cl_entity_s *ent = pEngfuncs->GetEntityByIndex(i);
pEngfuncs->pfnGetPlayerInfo(i, &pinfo);

if(ent != NULL && isValidEnt(ent))
{
if( strstr( pinfo.model, "arctic" ) || strstr( pinfo.model, "guerilla" ) || strstr( pinfo.model, "leet" ) || strstr( pinfo.model, "terror" ) ) {
return 1;
}
else if( strstr( pinfo.model, "gign" ) || strstr( pinfo.model, "gsg9" ) || strstr( pinfo.model, "sas" ) || strstr( pinfo.model, "urban" ) || strstr( pinfo.model, "vip" ) ) {
return 2;
}
else
{
return 0;
}
}
}

// ================================================================================
==
void drawPlayerList()
{
int terror_y = 0;
int counter_y = 0;
int x = 50;
hud_player_info_t pInfo;
for (int ax=0;ax<33;ax++)
{
cl_entity_s *ent = pEngfuncs->GetEntityByIndex(ax);
pEngfuncs->pfnGetPlayerInfo(ax, &pInfo);

if (ent != NULL && isValidEnt(ent))
{
char buf[128];
sprintf(buf,"%s",pInfo.name);

if (Team(ax) == 1)
{
DrawHudString(x,terror_y,255,0,0,buf);
terror_y += 15;
}
else if (Team(ax) == 2)
{
DrawHudString(x+100,counter_y,0,0,255,buf);
counter_y += 15;
}
}
}
}

密码被盗,请联系cscheat取回
« 返回列表
发帖 回复