How to add sprites esp to your hack!

社区服务
高级搜索
猴岛论坛CSGO反恐精英CS作弊器交流讨论How to add sprites esp to your hack!
发帖 回复
正序阅读 最近浏览的帖子最近浏览的版块
1个回复

How to add sprites esp to your hack!

楼层直达
作弊辅导员_h

ZxID:1019634

等级: 元老
定做作弊器
举报 只看楼主 使用道具 楼主   发表于: 2007-07-25 0
Client.cpp above Code:
drawPlayerEsp

add following
Code:
typedef struct
{
    char szName[256];
    char szSprite[256];
    HSPRITE hspr;
    wrect_t rc;
    int iRes;
} spriteinfo_t;

typedef struct
{
   
    int iSpritesLoaded;
    spriteinfo_t spriteinfo[MAX_SPRITES];
} spritedata_t;
spritedata_t spritedata;

void LoadSprites(client_sprite_t *pList, int iCount)
{
    int i;
    client_sprite_t *p;
    char buf[512];

    spritedata.iSpritesLoaded = 0;

    if(!pList)
    {
        return;
    }

    p = pList;

    i = iCount;

    while(i-- && p->szName[0] != 0x00 && spritedata.iSpritesLoaded < MAX_SPRITES)
    {
        strncpy(spritedata.spriteinfo[spritedata.iSpritesLoaded].szName, p->szName,MAX_SPRITES);
        strncpy(spritedata.spriteinfo[spritedata.iSpritesLoaded].szSprite, p->szSprite,MAX_SPRITES);

        sprintf(buf, "sprites/%s.spr", p->szSprite);
        spritedata.spriteinfo[spritedata.iSpritesLoaded].hspr = pEngfuncs->pfnSPR_Load(buf);

        memcpy(&(spritedata.spriteinfo[spritedata.iSpritesLoaded].rc), &(p->rc), sizeof(p->rc));
        spritedata.spriteinfo[spritedata.iSpritesLoaded].iRes = p->iRes;

        p++;
        spritedata.iSpritesLoaded++;

    }
}


client_sprite_t* __stdcall hookpfnSPR_GetList(char *psz, int *piCount)
{
    client_sprite_t *ret;

    ret = pEngfuncs->pfnSPR_GetList(psz, piCount);
  client_sprite_t *pList;
    if(!strcmp(psz, "sprites/weapon_knife.txt"))
    {
        int iCount;
        pList = pEngfuncs->pfnSPR_GetList("sprites/hud.txt", &iCount);
      if(pList)
      {
            LoadSprites(pList, iCount);
      }
    }
    return ret;
}

int GetSpriteIndex(char *szName)
{
    int i;

    if(szName[0] == 0x00)
        return -1;

    for(i = 0; i < spritedata.iSpritesLoaded; i++)
    {
        if(spritedata.spriteinfo.iRes == 640)
        {
            if(!strcmp(spritedata.spriteinfo.szName, szName))
            {
                return i;
            }
        }
    }
}


now somewhere in Code:
drawPlayerEsp

add following:
Code:
char buf[255];
    int index;
  if (strstr(gGetWeaponName(ent->curstate.weaponmodel),"nade"))
  { sprintf(buf,"d_grenade");  }
  else if (strstr(gGetWeaponName(ent->curstate.weaponmodel),"c4"))
  { sprintf(buf,"c4"); }
  else if (strstr(gGetWeaponName(ent->curstate.weaponmodel),"mp5"))
  { sprintf(buf,"d_mp5navy");  }
  else if (strstr(gGetWeaponName(ent->curstate.weaponmodel),"shield"))
  { sprintf(buf,"d_skull"); }
  else{ sprintf(buf, "d_%s",gGetWeaponName(ent->curstate.weaponmodel)); }
   
  index = GetSpriteIndex(buf);
    if (cvar.spriteesp)
  {
      if (index != -1)
      {                           
        pEngfuncs->pfnSPR_Set(spritedata.spriteinfo[index].hspr, color->r,color->g,color->b); // Get sprite ready
        pEngfuncs->pfnSPR_DrawAdditive(0, vecScreen[0]-10, vecScreen[1]-55, &(spritedata.spriteinfo[index].rc)); // Draw sprite
      }
  }


Register cvars spriteesp as int!
密码被盗,请联系cscheat取回
清风¢追月

ZxID:1232485

等级: 新兵
举报 只看该作者 沙发   发表于: 2007-07-25 0
什么啊
« 返回列表
发帖 回复