Il faut avoir le sound esp
ouvrer client.cpp et cherchez
Code:
PreS_DynamicSound
dans cela mettez
Code:
string theMessage;
string theMessage2;
string theMessage3;
int ax = GetPlayerByIndex(b);
if(b>0 && b<=36)
{
char* nstring = getPlayerNameByIndex(ax);
if( nstring )
{
theMessage = nstring; //vPlayers.entinfo.name;
theMessage2 = nstring; //vPlayers.entinfo.name;
theMessage3 = nstring; //vPlayers.entinfo.name;
}
ref.team = vPlayers[ax].team;
}
if (cvar.shootinfo)
{
//Scout
if(strstr(sample,"weapons/scout_fire-1"))
{
theMessage2+=" a tirer avec son scout *WARNING*";
gSetHudMessage3(theMessage2.c_str());
}
// M4A1(COLT)
if(strstr(sample,"weapons/m4a1_unsil-1"))
{
theMessage2+=" a tirer avec son m4a1(colt)";
gSetHudMessage3(theMessage2.c_str());
}
if(strstr(sample,"weapons/m4a1_unsil-2"))
{
theMessage2+=" a tirer avec son m4a1(colt)";
gSetHudMessage3(theMessage2.c_str());
}
if(strstr(sample,"weapons/m4a1-1"))
{
theMessage2+=" a tirer avec son m4a1(colt)";
gSetHudMessage3(theMessage2.c_str());
}
// M3 (SHOTGUN)
if(strstr(sample,"weapons/m3-1"))
{
theMessage2+=" a tirer avec son m3(shotgun)";
gSetHudMessage3(theMessage2.c_str());
}
// AK47
if(strstr(sample,"weapons/ak47-1"))
{
theMessage2+=" a tirer avec son ak47";
gSetHudMessage3(theMessage2.c_str());
}
if(strstr(sample,"weapons/ak47-2"))
{
theMessage2+=" a tirer avec son ak47";
gSetHudMessage3(theMessage2.c_str());
}
// AUG
if(strstr(sample,"weapons/aug-1"))
{
theMessage2+=" a tirer avec son ak47";
gSetHudMessage3(theMessage2.c_str());
}
// AWP
if(strstr(sample,"weapons/awp1"))
{
theMessage2+=" a tirer avec son awp *DANGER*";
gSetHudMessage3(theMessage2.c_str());
}
/*if(strstr(sample,"weapons/awp1"))
{
theMessage2+=" a tirer avec son awp *WARNING*";
gSetHudMessage3(theMessage2.c_str());
}*/
// G3SG1
if(strstr(sample,"weapons/g3sg1-1"))
{
theMessage2+=" a tirer avec son g3sg1 *DANGER*";
gSetHudMessage3(theMessage2.c_str());
}
// M249
if(strstr(sample,"weapons/m249-1"))
{
theMessage2+=" a tirer avec son m429";
gSetHudMessage3(theMessage2.c_str());
}
if(strstr(sample,"weapons/m249-2"))
{
theMessage2+=" a tirer avec son m429";
gSetHudMessage3(theMessage2.c_str());
}
// MAC10
if(strstr(sample,"weapons/mac10-1"))
{
theMessage2+=" a tirer avec son mac10";
gSetHudMessage3(theMessage2.c_str());
}
// MP5NAVY
if(strstr(sample,"weapons/mp5-1"))
{
theMessage2+=" a tirer avec son mp5";
gSetHudMessage3(theMessage2.c_str());
}
if(strstr(sample,"weapons/mp5-2"))
{
theMessage2+=" a tirer avec son mp5";
gSetHudMessage3(theMessage2.c_str());
}
// P90
if(strstr(sample,"weapons/p90-1"))
{
theMessage2+=" a tirer avec son p90";
gSetHudMessage3(theMessage2.c_str());
}
// SG550
if(strstr(sample,"weapons/sg550-1"))
{
theMessage2+=" a tirer avec son sg550";
gSetHudMessage3(theMessage2.c_str());
}
// SG552 (SIG)
if(strstr(sample,"weapons/sg552-1"))
{
theMessage2+=" a tirer avec son sg552";
gSetHudMessage3(theMessage2.c_str());
}
if(strstr(sample,"weapons/sg552-2"))
{
theMessage2+=" a tirer avec son sg552";
gSetHudMessage3(theMessage2.c_str());
}
// TMP
if(strstr(sample,"weapons/tmp-1"))
{
theMessage2+=" a tirer avec son tmp";
gSetHudMessage3(theMessage2.c_str());
}
if(strstr(sample,"weapons/tmp-2"))
{
theMessage2+=" a tirer avec son tmp";
gSetHudMessage3(theMessage2.c_str());
}
// UMP
if(strstr(sample,"weapons/ump45-1"))
{
theMessage2+=" a tirer avec son ump45";
gSetHudMessage3(theMessage2.c_str());
}
// XM1014 (SHOTGUN)
if(strstr(sample,"weapons/xm1014-1"))
{
theMessage2+=" a tirer avec son xm1014";
gSetHudMessage3(theMessage2.c_str());
}
}
apre cherchez
Code:
void AtRoundStart(void)
et mettez au dessus de ceci
Code:
static void ClearHudInfo()
{
if(cvar.shootinfo)
{
gSetHudMessage3(" ");
gSetHudMessage3(" ");
gSetHudMessage3(" ");
gSetHudMessage3(" ");
}
}
dans
Code:
void AtRoundStart(void)
mettez ceci
Code:
ClearHudInfo();
dans
Code:
hud_redraw
mettez ceci
Code:
if(cvar.soundfilter>0 && cvar.shootinfo)
{
int xxa = 20;
int yya = 50;
DrawHudString(xxa,yya,0,0,255,"Shoot Info:");
int xxb = 20;
int yyb = 66;
ColorEntry* clrf = colorList.get(38);
DrawHudString(xxb, yyb, clrf->r, clrf->g, clrf->b,
gHudMessage3[indexRedirect2[0]]);
int xxc = 20;
int yyc = 82;
ColorEntry* clra = colorList.get(39);
DrawHudString(xxc, yyc, clra->r, clra->g, clra->b,
gHudMessage3[indexRedirect2[1]]);
int xxd = 20;
int yyd = 98;
ColorEntry* clrb = colorList.get(40);
DrawHudString(xxd, yyd, clrb->r, clrb->g, clrb->b,
gHudMessage3[indexRedirect2[2]]);
int xxe = 20;
int yye = 114;
ColorEntry* clrc = colorList.get(41);
DrawHudString(xxe, yye, clrc->r, clrc->g, clrc->b,
gHudMessage3[indexRedirect2[3]]);
}
cherchez
Code:
string getLtfxDirFile(const char* basename)
{
if(strstr(basename,"..")){ return ":*?\\/<>\""; }
string ret = ltfxdir;
return (ret+basename);
}
et mettez en dessous
Code:
// Shoot Info Message
char gHudMessage3[4][256] = { "","","","" }; //allow up to four messages
StopTimer gHudTimer3;
int indexRedirect2[4] = { 0,1,2,3 }; // a "hack" way to scroll list without copying strings
int duration2;
void gSetHudMessage3(const char* message)
{
int dest = indexRedirect2[0];
indexRedirect2[0] = indexRedirect2[1];
indexRedirect2[1] = indexRedirect2[2];
indexRedirect2[2] = indexRedirect2[3];
indexRedirect2[3] = dest;
strcpy(gHudMessage3[dest],message);
gHudTimer3.countdown(duration2);
}
reste a declarer la cvar.