How to add saystats

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

How to add saystats

楼层直达
作弊辅导员_h

ZxID:1019634

等级: 元老
定做作弊器
举报 只看楼主 使用道具 楼主   发表于: 2007-07-25 0
ok go in client.cpp

search for "scoreatt"

and replace with

CODE:

USER_MSG_INTERCEPT(ScoreAttrib)
{
updateLocalPlayer();

BEGIN_READ(pbuf, iSize);
int idx = READ_BYTE();
int info = READ_BYTE();
vPlayers[idx].iInfo = info;

if( cvar.alive_method==0)
{
if(info&1) { vPlayers[idx].setAlive(false); vPlayers[idx].clearPVS(); }
else { vPlayers[idx].setAlive(); }
}

if(idx==me.ent->index) me.alive = ((info&1)==0);

return USER_MSG_CALL(ScoreAttrib);
}
USER_MSG_INTERCEPT(ScoreInfo)
{
updateLocalPlayer();

BEGIN_READ(pbuf, iSize);
int idx = READ_BYTE();
PlayerInfo& r = vPlayers[idx];

r.frags = READ_SHORT();
r.deaths = READ_SHORT();

if(r.frags<=0 ) { r.ratio=0; }
else { r.ratio = (double)r.frags / ((r.deaths<=0)?1:r.deaths); }

r.bestplayer = false;
bool foundbetter = false;
for(int i=0;i<vPlayers.size();i++)
{
if ( r.ratio < vPlayers.ratio ) foundbetter = true;
else if( r.ratio > vPlayers.ratio ) vPlayers.bestplayer=false;
}
if(!foundbetter) r.bestplayer = true;

if(idx==me.ent->index)
{
static int lastfrags=0;
static int lastdeaths=0;
if(me.headshots>r.frags || r.frags==0)
{
me.headshots = 0;
me.hspercent = 0;
bGotHeadshot = false;
lastfrags = r.frags;
lastdeaths = r.deaths;
}
else
{
if(bGotHeadshot) { ++me.headshots; }

double den = r.frags ? (double)r.frags : 1.0;
me.hspercent = (double)me.headshots/den*100.0;

if(cvar.saystats && (lastfrags!=r.frags || lastdeaths!=r.deaths ))
{
char tmp[128];
switch(cvar.saystats)
{
case 1:
sprintf(tmp,"say HACK NAME kills[%d] deaths[%d] headshots[%d]",
r.frags,r.deaths,me.headshots,me.hspercent);
gEngfuncs.pfnClientCmd(tmp);
break;
}
}

}
bGotHeadshot = false;
lastfrags = r.frags;
lastdeaths = r.deaths;
}
return USER_MSG_CALL(ScoreInfo);
}

END
=======
ok now go search for "void HookUserMsg" and add

CODE:

REDIRECT_MESSAGE( ScoreAttrib )
REDIRECT_MESSAGE( ScoreInfo )

END

//Also note scoreattribute maybe already in there
==========================


//now go to client.h

in local_player_info add

CODE:

int headshots;
int roundhs;
int roundKills;
float hspercent;

END

=======
now in "class PlayerInfo" add

CODE:

bestplayer = false;
frags = 0;
deaths = 0;
ratio = 0;

END

======
in "hud_player_info_t entinfo" add

CODE:

bool bestplayer;
float ratio;
int deaths;
int frags;

END

======
now go to cvar and add it

and that is it 


密码被盗,请联系cscheat取回
清风¢追月

ZxID:1232485

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