Catching ALL sound events
I'm trying to create a plugin that will allow a user to only hear sounds generated by him/herself only. Is there a way to hook the creation of ALL sounds (footsteps, jumping, firing, etc...).
I've tried using Fakemeta to hook the EmitSound function but that only catches certain sounds not ALL sounds. The basic idea of my plugin is to have a bunch of players in a server. If each player was blind, they would think they were playing alone. |
Re: Catching ALL sound events
Do what you're doing by hooking EmitSound and blocking them. That will block emitted sounds.
As for the rest of them, hook FM_PlaybackEvent and block those. This should also block the bullet ricocheting off the wall if I remember correctly. If blocking all of them blocks a few you don't want to block, you can test the eventindex. |
Re: Catching ALL sound events
Yes, thanks Wilson. The PlaybackEvent forward is catching more of the sounds I am trying to block. The problem I'm having now is blocking the sounds. It's easy to completely block the sound using FMRES_SUPERCEDE but I want to only block it from certain players (everyone except the creator of the entity that caused the sound).
|
Re: Catching ALL sound events
If you block the PlaybackEvent completely, the player who caused the sound will still hear it. He hears it client-sided.
|
Re: Catching ALL sound events
When I block it I dont see or hear anything. This is for TFC. If I throw a conc I don't hear the sound or see the blast; the grenade just disappears. Here is what I've got so far am I doing everything right?
Code:
|
Re: Catching ALL sound events
Grenades don't use playbackevents - they use emit_sound()
I can't think of a way to only emit_sound() to one person...other than shutting everyone else's volume temporarily or using client_cmd(id,"spk explosion.wav") on the one client.. |
| All times are GMT -4. The time now is 22:29. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.