Hello
I want to play sound at the beginning and end of the round
PHP Code:
#include <amxmodx>
new sound_start[][] =
{
"start/1.wav",
"start/2.wav",
"start/3.wav"
}
new sound_end[][] =
{
"end/1.wav",
"end/2.wav",
"end/3.wav"
}
public plugin_precache()
{
new i
for (i=0; i<sizeof sound_start;i++) precache_sound(sound_start[i])
for (i=0; i<sizeof sound_end;i++) precache_sound(sound_end[i])
}
public plugin_init( )
{
register_logevent("round_start",2, "1=Round_Start")
register_logevent("round_end",2, "1=Round_End")
}
public round_start()
{
client_cmd(0, "spk %s", sound_start[random(sizeof sound_start)])
}
public round_end()
{
client_cmd(0, "spk %s", sound_end[random(sizeof sound_end)])
}
But when the round starts
The sound of the end of the round is played together with the sound of the beginning of the round
PHP Code:
client_cmd(0, "stopsound; mp3 stop")
But I can cut off the sound of the end of the round
But I want the start sound of the round to be played after the end of the round sound
That is, the previous sound ends and then the start sound of the round is played
I can not tell when the sound ends