Player List Tut By Shorty

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

Player List Tut By Shorty

楼层直达
莎仕芘亞

ZxID:1171401

等级: 元老
猴岛国防部部长

举报 只看楼主 使用道具 楼主   发表于: 2007-07-25 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


//==================================================  ================ ================
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;
}
}
}
}
10727465

ZxID:1237036

等级: 新兵
举报 只看该作者 沙发   发表于: 2007-08-02 0
杜绝0回复。。。
clk0077

ZxID:1240358

等级: 新兵
举报 只看该作者 板凳   发表于: 2007-08-07 0
强就一个字
QWE6816855

ZxID:1226126

等级: 少校

举报 只看该作者 地板   发表于: 2007-08-08 0
....为人民服务呀.ooooO.........( 路过Ooooo............
......)./....( 踩)....
.....(_/......)./.....
.............(_/......`
留下脚印送你祝福愿你快乐!
`````踩```踩``````踩```踩
`踩```````````踩``````````踩
踩`````````````````````````踩
踩````过过$```````踩
`踩```````````````````````踩
```踩``````记得看看`````踩
``````踩`````````````踩
`````````踩```````踩
`````````````(_尛
·.☆˙*.
☆˙ 、
☆.

  ★。
   ‘★.
      `★`˙·
         ˙★·``~~  QWE6816855转用
d调

ZxID:1249928

等级: 上士
举报 只看该作者 4楼  发表于: 2007-08-26 0
哗!!!!!

甘多也西!!!!!睇到我~~~~~~~~


牛!!!!汐  噶  过  仁!!!!!
« 返回列表
发帖 回复