Is there a way to block sounds coming from model animations in Lua?

Hello, I am making a swep, and I don’t like the sounds that the model comes with. my modeler friend doesn’t know how to remove the sounds. so I was wondering, is there a way to block sounds coming from models using lua?

Thanks!

[editline]08:15PM[/editline]

cmon, just tell me if I cant!!!

[editline]08:29PM[/editline]

Please help!!!

OK… is there a way to block those specific sounds on that moment for a period on X seconds?

[editline]10:28PM[/editline]

Just tell me dammit!!!

No need to be angry and go “DAMMIT!!!”

heeeelp meeeee!!!

Typing ‘disconnect’ in console seems to disconnect the sound.


(User was banned for this post ("Trolling" - Benji))

-_- I’m not an idiot you know.

if the model is using a sound, then all you have to do is to delete the sound file = Profit

On a side note, since you want to use lua. I have no idea…

-_- its a css sound

[lua]function ENT:TurnOff ()
if ( self.Active == 1 ) then
self.Entity:StopSound( “nameofthesoundhere.wav” )
end
end [/lua] I think something like this would work… Untested though.

I’ll try it

[editline]06:48AM[/editline]

might not work

[editline]06:55AM[/editline]

wont work because the model emits the sound not the script…

copy css souund , rename it , edit it , profit

No, you can’t.