AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   block Go Go Go sound on round start. (https://forums.alliedmods.net/showthread.php?t=88095)

One 03-20-2009 12:03

block Go Go Go sound on round start.
 
Tittle...

AntiBots 03-20-2009 12:37

Re: block Go Go Go sound on round start.
 
use FM_EmitSound

Dr.G 03-20-2009 13:06

Re: block Go Go Go sound on round start.
 
search and you may find something usefull like this

hleV 03-20-2009 13:28

Re: block Go Go Go sound on round start.
 
Well, it's easy to block a sound. It's harder to check if the sound was auto-played by the game.

One 03-20-2009 13:56

Re: block Go Go Go sound on round start.
 
The problem is, its the autoplay sound. when the round starts, u hear this sound & nobody plays any radio sounds.

Dr.G 03-20-2009 15:13

Re: block Go Go Go sound on round start.
 
then fire stopsound to ppl on round start. thats a simple solution might not be the best, but possible

hleV 03-20-2009 19:02

Re: block Go Go Go sound on round start.
 
Try this and tell if it works.
Code:
#include <amxmodx> #include <fakemeta>   new const g_StartRadioSounds[][] = {         "radio/com_go.wav",         "radio/go.wav",         "radio/letsgo.wav",         "radio/locknload.wav",         "radio/moveout.wav" };   new bool:g_RoundStart;   public plugin_init() {         register_plugin("Block Round Start Sound", "1.0", "hleV");           register_logevent("RoundStart", 2, "1=Round_Start");           register_forward(FM_EmitSound, "EmitSound"); }   public RoundStart() {         g_RoundStart = true;           set_task(0.5, "RoundStartOver"); }   public RoundStartOver()         g_RoundStart = false;   public EmitSound(ClientID, ChannelID, Sample[]) {         if (!g_RoundStart)                 return FMRES_IGNORED;           for (new Sound = 0; Sound < sizeof(g_StartRadioSounds) - 1; Sound++)                 if (equal(Sample, g_StartRadioSounds[Sound]))                         return FMRES_SUPERCEDE;           return FMRES_IGNORED; }

Dores 03-21-2009 04:54

Re: block Go Go Go sound on round start.
 
If FM_EmitSound doesn't work, hook the SendAudio event.

crazyeffect 03-21-2009 04:59

Re: block Go Go Go sound on round start.
 
Anyone tested hlev's scipt?

ConnorMcLeod 03-21-2009 05:05

Re: block Go Go Go sound on round start.
 
Won't work, i've already posted the code somewhere one the forum, with SendAudio message + filter if it's a start round message or a regular radio message.


All times are GMT -4. The time now is 08:56.

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