Il vous faut le sound esp pour faire fonctionner ce code
Code inspiré par le code de Mike
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Client.cpp
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Dans :
Code:
PreS_DynamicSound
Mettez :
Code:
string theMessage4;
string theMessage5;
string theMessage6;
size_t length5;
size_t length6;
size_t length7;
if(b>0 && b<=36)
{
theMessage4 = vPlayers.entinfo.name;
theMessage5 = vPlayers.entinfo.name;
theMessage6 = vPlayers.entinfo.name;
length5 = theMessage4.length();
length6 = theMessage5.length();
length7 = theMessage6.length();
ref.team = vPlayers[ax].team;
}
if (cvar.zoominfo)
{
if(strstr(sample,"weapons/zoom"))
{
theMessage5+=" est en train de zoomer !";
gSetHudMessage4(theMessage5.c_str());
}
}
Après recherchez :
Code:
void AtRoundStart(void)
Et mettez au dessus :
Code:
static void ClearHudInfo()
{
if(cvar.zoominfo)
{
gSetHudMessage4(" ");
gSetHudMessage4(" ");
gSetHudMessage4(" ");
gSetHudMessage4(" ");
}
}
Dans
Code:
void AtRoundStart(void)
Mettez :
Code:
ClearHudInfo();
Dans
Code:
void HUD_Redraw (float x, int y)
Mettre
Code:
if(cvar.soundfilter>0 && cvar.zoominfo)
{
int xxa = 20;
int yya = 226;
DrawGlowString(xxa,yya,0, 0, 128,"Zoom Info:");
int xxb = 20;
int yyb = 242;
ColorEntry* clrf = colorList.get(38);
DrawHudString(xxb, yyb, clrf->r, clrf->g, clrf->b,
gHudMessage4[indexRedirect3[0]]);
int xxc = 20;
int yyc = 258;
ColorEntry* clra = colorList.get(39);
DrawHudString(xxc, yyc, clra->r, clra->g, clra->b,
gHudMessage4[indexRedirect3[1]]);
int xxd = 20;
int yyd = 274;
ColorEntry* clrb = colorList.get(40);
DrawHudString(xxd, yyd, clrb->r, clrb->g, clrb->b,
gHudMessage4[indexRedirect3[2]]);
int xxe = 20;
int yye = 290;
ColorEntry* clrc = colorList.get(41);
DrawHudString(xxe, yye, clrc->r, clrc->g, clrc->b,
gHudMessage4[indexRedirect3[3]]);
}
Cherchez :
Code:
string getOgcDirFile(const char* basename)
{
if(strstr(basename,"..")){ return ":*?\\/<>\""; }
string ret = ltfxdir;
return (ret+basename);
}
et mettez en dessous :
Code:
// Zoom Info Message
char gHudMessage4[4][256] = { "","","","" }; //allow up to four messages
StopTimer gHudTimer4;
int indexRedirect3[4] = { 0,1,2,3 }; // a "hack" way to scroll list without copying strings
int duration3;
void gSetHudMessage4(const char* message)
{
int dest = indexRedirect3[0];
indexRedirect3[0] = indexRedirect3[1];
indexRedirect3[1] = indexRedirect3[2];
indexRedirect3[2] = indexRedirect3[3];
indexRedirect3[3] = dest;
strcpy(gHudMessage4[dest],message);
gHudTimer4.countdown(duration3);
}
Déclarez votre Cvar et n'hésitez pas à demander dans la partie aide de ce forum en cas de problème