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