Hybrid client

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

Hybrid client

楼层直达
作弊辅导员_h

ZxID:1019634

等级: 元老
定做作弊器
举报 只看楼主 使用道具 楼主   发表于: 2007-07-25 0
NOTE: IF YOU HAVE A CLIENT HOOK YOU CAN DRAW THE ESP IN HUD_REDRAW OR HUD_FRAME IF YOU HAVE PROBS WITH GLBEGIN

First you should have TeamInfo hooked.

Second make a player info struct...IE: Code:

struct player_info{
};

Now you will need an int to store the team number and the entity info. Code:

struct player_info{
    int team;
    hud_player_info_t entinfo;
                cl_entity_s *ent;
};

Make an array using vector Code:

std::vector<player_info> Player;

You will need the following for Getting a player by index Code:

int GetPlayerByIndex(int index)
{
for (int ax=0;ax<Player.size();ax++)
if (Player[ax].index == index) return ax;
return -1;
}

int GetPlayerByIndexX(int index)
{
  player_info dummy;
  int px = GetPlayerByIndex(index);
  if (px == -1)
  {
      Player.push_back(dummy);
      px = Player.size()-1;
      Player[px].index = index;
      try {
      Player[px].ent = pEngfuncs->GetEntityByIndex(index);
      pEngfuncs->pfnGetPlayerInfo(index, &Player[px].entinfo);
      }
      catch (...)
      {}
      Player[px].inpvs = 0;
  }
  return px;
}

Now, when TeamInfo is called Get the current player by index Code:

int px = GetPlayerByIndexX(eindex);

Then Check if teamtext is TERRORIST, or CT or UNASSIGNED or SPECTATOR
IE: Code:

const char * STR_TERROR = "TERRORIST";
    const char * STR_CT = "CT";
    const char * STR_UNASSIGNED = "UNASSIGNED";
    const char * STR_SPECTATOR = "SPECTATOR";
    if  (!strcmpi (teamtext, STR_TERROR)) Player[px].team = 1;
    else if  (!strcmpi (teamtext, STR_CT)) Player[px].team = 2;
    else if  (!strcmpi (teamtext, STR_UNASSIGNED)) Player[px].team = 0;
    else if  (!strcmpi (teamtext, STR_SPECTATOR)) Player[px].team = 0;
    else {
        Player[px].team = -1;
    }

Also at this point we can store the Player's Entity Info.
IE: Code:

pEngfuncs->pfnGetPlayerInfo(Player[px].ent->index, &Player[px].entinfo);

Create a CalcScreen bool...It should look like this: Code:

bool CalcScreen(float *origin,float *vecScreen)
    {
        int result = pEngfuncs->pTriAPI->WorldToScreen(origin,vecScreen);
        if(vecScreen[0] < 1 && vecScreen[1] < 1 && vecScreen[0] > -1 && vecScreen[1] > -1 && !result)
        {
        vecScreen[0] = vecScreen[0] * pEngfuncs->GetWindowCenterX() + pEngfuncs->GetWindowCenterX();
        vecScreen[1] = -vecScreen[1] * pEngfuncs->GetWindowCenterY() + pEngfuncs->GetWindowCenterY();
        return true;
        }
        return false;
    }

Next Every GLEnable after the Hook has been Initialized Code:

for (int ax=0;ax<Player.size();ax++)
    {
        int px = GetPlayerByIndexX(ax);
        if(CalcScreen(Player[px].ent->origin,vecScreen))
        {
            if(Player[px].team==1){ DrawHudString(vecScreen[0],vecScreen[1]-16,Player[px].entinfo.name,255,40,40,true); }
            if(Player[px].team==2){ DrawHudString(vecScreen[0],vecScreen[1]-16,Player[px].entinfo.name,40,80,255,true); }
        }
    }

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