AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Stop sound at round end (https://forums.alliedmods.net/showthread.php?t=63292)

tabularasa 11-17-2007 07:08

Stop sound at round end
 
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?

kim_perm 11-17-2007 17:04

Re: Stop sound at round end
 
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



?

tabularasa 11-18-2007 07:55

Re: Stop sound at round end
 
works fine thx


All times are GMT -4. The time now is 01:14.

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