AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Emit Sound Blocking (https://forums.alliedmods.net/showthread.php?t=133656)

Gadzislaw007 07-27-2010 15:40

Emit Sound Blocking
 
Code:

        register_forward(FM_EmitSound, "dzwieki")



public dzwieki(id, channel, const sample[])
{

        if(equal(sample,"weapons/awp1.wav"))
                        {
                                engfunc(EngFunc_EmitSound,id,CHAN_WEAPON,"weapons/usp1.wav",1.0,ATTN_NORM,0,PITCH_NORM)
                                return FMRES_SUPERCEDE
                        }

I want to replace awp1.wav sound with usp1.wav.
What have I done wrong? I still hear awp sound.

drekes 07-27-2010 20:51

Re: Emit Sound Blocking
 
You can't replace weapon sounds except knife, all the others are client-side.

Gadzislaw007 07-27-2010 20:55

Re: Emit Sound Blocking
 
That's bad, but thanks for the reply.

DaxProxy 07-28-2010 07:46

Re: Emit Sound Blocking
 
It can be done, if you will use client_cmd( id, stopsound ) and after that call your new weapon sound...

But it would be hella buggy, since all the other sound's get blocked too...
I wonder if this could be done by Orpheu...it seems like everything can be done using Orpheu.

Vechta 07-28-2010 07:56

Re: Emit Sound Blocking
 
but its possible to block sounds and replace with new, but its hard job :/


All times are GMT -4. The time now is 00:10.

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