AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CSS] Stop flashlight sound (https://forums.alliedmods.net/showthread.php?t=212924)

iDragon 04-08-2013 12:33

[CSS] Stop flashlight sound
 
1 Attachment(s)
Recently I saw many players turning on and off their flashlight very fast (they bound "impulse 100" to their mwheelup / mwheeldown buttons), and by that spamming with the flashlight sound.

Disallowing players to use flashlight is not optional, because we are playing sometimes in dark maps.
So I built this simple plugin to stop the sound flashlights broadcasts.

Plugin CVARS:
Quote:

sm_block_flashlight_sound_version
Have fun.

SHAREN 04-08-2013 13:53

Re: [CSS] Stop flashlight sound
 
I still have my idea to make a plug for the likeness of antiflood, with time interval

vodka00 04-09-2013 15:50

Re: [CSS] Stop flashlight sound
 
You could technically block other sounds in same way too? Such as death sound or jumping sound of other players or func_door sounds?

iDragon 04-10-2013 03:26

Re: [CSS] Stop flashlight sound
 
Quote:

Originally Posted by vodka00 (Post 1929600)
You could technically block other sounds in same way too? Such as death sound or jumping sound of other players or func_door sounds?

yes.

you can block almost any sound, except for ambient and Guns sounds.
(For ambient sound use HookAmbientSound)

vodka00 04-13-2013 17:04

Re: [CSS] Stop flashlight sound
 
Here is one for the sprayer, it's annoying too.

PHP Code:

    if (StrEqual(sample"player/sprayer.wav"false))
        return 
Plugin_Stop

but for some reason I can't get these to work, would these sounds be part of guns?


PHP Code:

    if (StrEqual(sample"weapons/ClipEmpty_Pistol.wav"false))
        return 
Plugin_Stop;
        
    if (
StrEqual(sample"weapons/ClipEmpty_Rifle.wav"false))
        return 
Plugin_Stop


iDragon 04-17-2013 06:05

Re: [CSS] Stop flashlight sound
 
Quote:

Originally Posted by vodka00 (Post 1932115)
Here is one for the sprayer, it's annoying too.

PHP Code:

    if (StrEqual(sample"player/sprayer.wav"false))
        return 
Plugin_Stop

but for some reason I can't get these to work, would these sounds be part of guns?


PHP Code:

    if (StrEqual(sample"weapons/ClipEmpty_Pistol.wav"false))
        return 
Plugin_Stop;
        
    if (
StrEqual(sample"weapons/ClipEmpty_Rifle.wav"false))
        return 
Plugin_Stop


For the other 2 hooks, you need to use AddAmbientSoundHook() .

GerardoLawson 05-22-2013 09:43

Re: [CSS] Stop flashlight sound
 
Quote:

Originally Posted by iDragon (Post 1928793)
Recently I saw many players turning on and off their flashlight very fast (they bound "impulse 100" to their mwheelup / mwheeldown buttons), and by that spamming with the flashlights sound.

Disallowing players to use flashlight is not optional, because we are playing sometimes in dark maps.
So I built this simple plugin to stop the sound flashlights broadcasts.

Plugin CVARS:
Have fun.

Could be a real good plugin. We surely need flashlight for better gaming and we need such wonderful plugins. So very nice work done:):)

RedSword 06-01-2013 19:15

Re: [CSS] Stop flashlight sound
 
Looks good. Approved.

FYI, using FCVAR_REPLICATED can produce errors on the client; you might want to change that.

pubhero 06-02-2013 02:44

Re: [CSS] Stop flashlight sound
 
Hi.
This plugin not works on my CSS server.

Code:

08:50:30 Metamod:Source version 1.10.0-dev
        Build ID: 839:eab123e5ee23-dev
        Loaded As: Valve Server Plugin
        Compiled on: May 13 2013
        Plugin interface version: 15:14
        SourceHook version: 5:5
        http://www.metamodsource.net/

08:50:33  SourceMod Version Information:
            SourceMod Version: 1.5.0-dev+3841
            SourcePawn Engine: SourcePawn 1.1, jit-x86 (build 1.5.0-dev+3841)
            SourcePawn API: v1 = 4, v2 = 4
            Compiled on: May 16 2013 07:48:09
            Build ID: 3841:5f829335d94a
            http://www.sourcemod.net/

08:50:35 Protocol version 24
        Exe version 1765266 (cstrike)
        Exe build: 15:42:29 May 16 2013 (5304) (240)

Linux based game server.
Plugin was started with a console command
sm plugins load block_flashlight_sound
No error messages. Just not works.

NOTORIOUS7302 08-29-2021 17:19

Re: [CSS] Stop flashlight sound
 
wait does it block sound for everyone or only everyone else except for you?


All times are GMT -4. The time now is 12:49.

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