Not really. The problem is the following.
There is a plugin which let me choose a mod to play on mapstart. If the mod is choosen a config file is loaded. I thought about adding a line like "mp3 play sound/misc/Rollthedice.mp3" into the config.
As I don't really understand the code I need to do it this way. If I could see how the config file is choosen I could for sure add the "mp3 play ... " into the code after the choice of the cfg file.
The result should be:
Roll the Dice is choosen -> Mp3 sound: Roll the dice choosen
Gungame choosen -> Mp3 sound: Gungame choosen
Funweapons -> Mp3 sound: Funweapons choosen
This seem to be the code of the Plugin where the result of the menu is generated.
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]);
#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);
}
In my case I got 3 mods to choose. But don't see a way to tell in this code if Menu item 1 won play sound "sound/misc/mod1.mp3"..
So I'm thinking about the option to put this sound into the .cfg which will be loaded when a mod won.
Hope someone can help.