Raised This Month: $ Target: $400
 0% 

stopsound at end of round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
InteX01
Senior Member
Join Date: Jan 2017
Old 06-06-2017 , 13:24   stopsound at end of round
Reply With Quote #1

I used this
emit_sound(0, CHAN_AUTO, "blahblah.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
And yes it loads good... But i want to use "stopsound" on the end of the round... So When Ct or TT team is killed , and round is over , this song stops...

What code can i use to stopsound at the end of round
InteX01 is offline
Houssam Benmouna
Senior Member
Join Date: Apr 2016
Old 06-06-2017 , 13:28   Re: stopsound at end of round
Reply With Quote #2

That's must help you

PHP Code:
#include <amxmodx>

public plugin_init() {
    
register_logevent("logevent_round_end"2"1=Round_End")  
}

public 
logevent_round_end(id)
{
    
client_cmd(id"spk ^"mp3 stopstopsound^"")


Last edited by Houssam Benmouna; 06-06-2017 at 13:31. Reason: can = must no problem XD
Houssam Benmouna is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 06-06-2017 , 13:39   Re: stopsound at end of round
Reply With Quote #3

Quote:
Originally Posted by Houssam Benmouna View Post
That's must help you

PHP Code:
#include <amxmodx>

public plugin_init() {
    
register_logevent("logevent_round_end"2"1=Round_End")  
}

public 
logevent_round_end(id)
{
    
client_cmd(id"spk ^"mp3 stopstopsound^"")

Also hook T & CT Win logevent for extra help.
__________________
Relaxing is offline
InteX01
Senior Member
Join Date: Jan 2017
Old 06-06-2017 , 13:45   Re: stopsound at end of round
Reply With Quote #4

In nextround still playing music
InteX01 is offline
InteX01
Senior Member
Join Date: Jan 2017
Old 06-06-2017 , 13:53   Re: stopsound at end of round
Reply With Quote #5

PHP Code:
#include <amxmodx>

public plugin_init() 

  
register_event("SendAudio""t_win""a""2&%!MRAD_terwin")
  
register_event("SendAudio""ct_win""a""2&%!MRAD_ctwin")  
}

public 
t_win()
{
client_cmd(0,"stopsound")
}
public 
ct_win()
{
  
client_cmd(0,"stopsound")

also tried this.. Doesnt work.
InteX01 is offline
Houssam Benmouna
Senior Member
Join Date: Apr 2016
Old 06-06-2017 , 13:59   Re: stopsound at end of round
Reply With Quote #6

Try This?

PHP Code:
#include <amxmodx>

new bomb[32]

public 
plugin_init() {
    
register_logevent("logevent_round_end"2"1=Round_End")  
}

public 
logevent_round_end(id)
{
    
client_cmd(id"spk ^"mp3 stopstopsound^"")
    
fix_bug(id)
}

public 
fix_bug(id)
{
    if(
bomb[id] == 100) return PLUGIN_HANDLED;   
    
    if(
bomb[id] == 0)
    { 
        
client_cmd(id"spk ^"mp3 stopstopsound^"")     
        
bomb[id] = 100
    
}
    return 
PLUGIN_HANDLED


Last edited by Houssam Benmouna; 06-06-2017 at 14:00. Reason: Nothing
Houssam Benmouna is offline
Houssam Benmouna
Senior Member
Join Date: Apr 2016
Old 06-06-2017 , 14:00   Re: stopsound at end of round
Reply With Quote #7

you can change bomb to rounds....
Houssam Benmouna is offline
InteX01
Senior Member
Join Date: Jan 2017
Old 06-06-2017 , 14:11   Re: stopsound at end of round
Reply With Quote #8

Still music in the following round. :/
InteX01 is offline
Houssam Benmouna
Senior Member
Join Date: Apr 2016
Old 06-06-2017 , 14:12   Re: stopsound at end of round
Reply With Quote #9

post your full code
Houssam Benmouna is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 06-06-2017 , 14:20   Re: stopsound at end of round
Reply With Quote #10

Housam theres no id passed in the logevent
Here is the correct way

PHP Code:
#include amxmodx

public plugin_init() {
    
register_logevent("logevent_round_end"2"1=Round_End")  
}

public 
logevent_round_end()
{
    
client_cmd(0"mp3 stop; stopsound;")


If you are using emit sound native hook its forward and check the sound if its match with the 3rd param of the forward and block it
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 06-06-2017 at 14:24.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Reply



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 08:36.


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