Hello!
I have this code:
PHP Code:
#include <amxmodx>
public plugin_init()
{
register_plugin("RoundSound","1.0","FastPanel")
register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")
register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")
}
public t_win()
{
new rand = random_num(1,16)
client_cmd(0,"stopsound")
switch(rand)
{
case 1: client_cmd(0,"spk misc/rs4")
case 2: client_cmd(0,"spk misc/rs5")
case 3: client_cmd(0,"spk misc/rs6")
}
return PLUGIN_HANDLED
}
public ct_win()
{
new rand = random_num(1,16)
client_cmd(0,"stopsound")
switch(rand)
{
case 1: client_cmd(0,"spk misc/rs1")
case 2: client_cmd(0,"spk misc/rs2")
case 3: client_cmd(0,"spk misc/rs3")
}
return PLUGIN_HANDLED
}
public plugin_precache()
{
precache_sound("misc/rs1.wav")
precache_sound("misc/rs2.wav")
precache_sound("misc/rs3.wav")
precache_sound("misc/rs4.wav")
precache_sound("misc/rs5.wav")
precache_sound("misc/rs6.wav")
return PLUGIN_CONTINUE
}
but the problem is that the music is not plays when round end.
i think that the code try to play the music because there is amputation when "Counter Terrorrist Win" to Sound