AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Blocking ALL sound from a player (https://forums.alliedmods.net/showthread.php?t=310419)

ttasdasda 09-02-2018 17:21

Blocking ALL sound from a player
 
Hello, I have a hard time blocking all sounds coming from a (certain) player. No matter what I do, I can't get rid of reload/zoom sounds (and possibly others, too).

I've tried sound hooks, both normal and ambient. Those sounds simply go unnoticed by it (same as sounds caused by "Shotgun Shot").
I've tried hooking weapon_reload event and disabling broadcast, but that doesn't work either.
I've tried SDKHook_SetTransmit on client. The client is invisible and doesn't update on the radar, but I can still hear those pesky sounds.
I've tried SDKHook_SetTransmit on weapons. Still no luck.
I've tried SDHook_Reload. I take it I can't do anything with it except for blocking the reload (which I don't intend to do).

Any ideas?

Drixevel 09-03-2018 00:49

Re: Blocking ALL sound from a player
 
Not 100% sure if you can block all sounds from playing to a client but what I would try is the sound hooks again but try both setting the volume to 0, changing the path to empty maybe with both of these returning changed and then just flat out returning stop. Certain things like player footsteps are hard to stop because of client predictions from previous experience.

You could send the convar to the client on connect to set their footsteps to 0, I did that once and it seemed to work.

Neuro Toxin 09-03-2018 04:52

Re: Blocking ALL sound from a player
 
You cant block predicted sounds for yourself.

They will be blocked for all clients besides the client generating the sound.

You can turn prediction off to help accomplish what you want, but movement and key reactions will be effected by ping.

ttasdasda 09-03-2018 08:10

Re: Blocking ALL sound from a player
 
Quote:

Originally Posted by Neuro Toxin (Post 2613461)
You cant block predicted sounds for yourself.

They will be blocked for all clients besides the client generating the sound.

You can turn prediction off to help accomplish what you want, but movement and key reactions will be effected by ping.

I thought as much, but surely there's gotta be a way to make the client completely oblivious to the fact that some other player is reloading? Or is it impossible to prevent it from being networked?

SHUFEN 09-03-2018 08:48

Re: Blocking ALL sound from a player
 
Maybe you are able to block broadcast on weapon_reload Event.
Not tested.

mug1wara 09-06-2018 09:20

Re: Blocking ALL sound from a player
 
Sounds are client sided.

You can block the client’s sound when firing a weapon, but others would still hear it.

Although I’m not entirely sure if you could force the players to run with no sound. Worth a try.

Edit:

(Anyone, correct me if I’m wrong)

Neuro Toxin 09-06-2018 18:54

Re: Blocking ALL sound from a player
 
Quote:

Originally Posted by mug1wara (Post 2614003)
Sounds are client sided.

You can block the client’s sound when firing a weapon, but others would still hear it.

Although I’m not entirely sure if you could force the players to run with no sound. Worth a try.

Edit:

(Anyone, correct me if I’m wrong)

It's the opposite.

You can block almost everysound including footsteps for other players.

You cant block most of your own sounds as the game client plays them as part of prediction.

mug1wara 09-07-2018 02:26

Re: Blocking ALL sound from a player
 
Quote:

Originally Posted by Neuro Toxin (Post 2614077)
It's the opposite.

You can block almost everysound including footsteps for other players.

You cant block most of your own sounds as the game client plays them as part of prediction.

Oh yea right, makes sense


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

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