Raised This Month: $ Target: $400
 0% 

End of sound


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 08-13-2020 , 08:12   End of sound
Reply With Quote #1

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=0i<sizeof sound_start;i++)     precache_sound(sound_start[i])
    for (
i=0i<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
amirwolf is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:49.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode