Raised This Month: $ Target: $400
 0% 

Stop sound at round end


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tabularasa
Member
Join Date: Dec 2006
Location: Hannover/Germany
Old 11-17-2007 , 07:08   Stop sound at round end
Reply With Quote #1

Quote:
#include <amxmodx>

new sound[] = "misc/jepsound.wav";

public plugin_init()
{
register_plugin("Jeopardy Bomb","0.1","SweatyBanana");
register_logevent("f_planted", 3, "2=Planted_The_Bomb");
}

public f_planted()
{
new Players[32], Num, i;
get_players(Players, Num);

for(i = 0; i <= Num; i++)
{
new j = Players[i];
client_cmd(j,"spk %s",sound);
}
}

public plugin_precache()
{
precache_sound(sound);
}
Hi,
i want to code this that the sound stops at round end. This coding stops the sound at bomb explosion or defusing but not when all T/CT died before.
Can someone help?
tabularasa is offline
Send a message via ICQ to tabularasa
kim_perm
Member
Join Date: Sep 2007
Location: Perm, Russia
Old 11-17-2007 , 17:04   Re: Stop sound at round end
Reply With Quote #2

Code:

Code:
#include <amxmodx> new sound[] = "misc/jepsound.wav"; public plugin_init() { register_plugin("Jeopardy Bomb","0.1","SweatyBanana"); register_logevent("f_planted", 3, "2=Planted_The_Bomb"); //add begin register_logevent("at_round_end", 2, "0=World triggered", "1=Round_End") //add end } public f_planted() { new Players[32], Num, i; get_players(Players, Num); for(i = 0; i <= Num; i++) { new j = Players[i]; client_cmd(j,"spk %s",sound); } } public plugin_precache() { precache_sound(sound); } //add begin public at_round_end() { new Players[32], Num, i; get_players(Players, Num); for(i = 0; i <= Num; i++) { new j = Players[i]; client_cmd(j,"stopsound"); } } //add end
?
kim_perm is offline
tabularasa
Member
Join Date: Dec 2006
Location: Hannover/Germany
Old 11-18-2007 , 07:55   Re: Stop sound at round end
Reply With Quote #3

works fine thx
tabularasa is offline
Send a message via ICQ to tabularasa
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 01:14.


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