Hi Guys
I would like to implemet sounds.
For example my menu looks like this:
1. Gungame
2. Funweapons
3. Roll the dice
When the vote is over and the reound is restarted I would like to hear Gungame enabled or funweapons enabled or roll the dice enabled. Depending on which mod won. Precache of the sounds is working but I don't know how to differ which sound should be played on what result?
I just added the client_cmd at the end of the checkvotes. But this plays the sound on whatever mod won.
Hope you know what I need ;)
THX
Amokossi
Code:
public CheckVotes()
{
new best = 9;
new noVotes = 0;
for(new a = 0; a < 9; a++)
{
if(count[a] > count[best])
best = a;
else
noVotes++;
}
if(noVotes == 10)
best = 9;
if(best != 9)
{
client_print(0, print_chat, "%s won with %d votes", menuBody[best], count[best]);
client_cmd(0,"mp3 play sound/misc/modsound.mp3") ;
#if defined DEBUG
server_print("%s won with %d votes", menuBody[best], count[best]);
#endif
}
else if(best == 9)
{
client_print(0, print_chat, "%s won with %d votes", "No mod", count[best]);
#if defined DEBUG
server_print("%s won with %d votes", "No mod", count[best]);
#endif
}
loaded = best;
SetCvars(best);
}