PDA

View Full Version : Ok i Have a Problem


spid3rm4n
26th July 2002, 12:43
I want to add this code to my Joolz Tweak
but i dont now how to register the cvar(s)
etc.
plz help me :=)


if(cvar.saystats && (lastfrags!=r.frags || lastdeaths!=r.deaths ))
{
char tmp[128];
switch(cvar.saystats)
{
case 1:
sprintf(tmp,"say frags:[%d] deaths:[%d] ratio:[%4.2f] headshots:[%d = %4.1f percent]",
r.frags,r.deaths,r.ratio,me.headshots,me.hspercent );
gEngfuncs.pfnClientCmd(tmp);
break;
case 2:
char* tag = "&y";
if( r.frags>lastfrags ) tag = "&g";
if( r.frags<lastfrags ) tag = "&r";
if( r.deaths>lastdeaths) tag = "&r";

Con_Echo("%sfrags:[%d] deaths:[%d] ratio:[%4.2f] headshots:[%d = %4.1f percent]",
tag,r.frags,r.deaths,r.ratio,me.headshots,me.hsper cent);
break;
}
}
}
bGotHeadshot = false;
lastfrags = r.frags;
lastdeaths = r.deaths;
}

return USER_MSG_CALL(ScoreInfo);
}

greenball
26th July 2002, 22:25
in cvar.h
and in client.cpp
just search for example 4 "shoot"
and u will find the place....