Raised This Month: $12 Target: $400
 3% 

[CSS] Stop flashlight sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author
iDragon
Member
Join Date: Aug 2010
Plugin ID:
3608
Plugin Version:
1.0
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
    4 
    Plugin Description:
    This plugin is stopping the flashlight sound from broadcasting.
    Old 04-08-2013 , 12:33   [CSS] Stop flashlight sound
    Reply With Quote #1

    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.
    Attached Files
    File Type: sp Get Plugin or Get Source (block_flashlight_sound.sp - 1744 views - 783 Bytes)
    __________________
    Sorry for my bad english.

    Last edited by iDragon; 04-08-2013 at 12:44. Reason: I don't know why, but the version and 'cvar' has been removed when I posted this plugin...
    iDragon is offline
    SHAREN
    Senior Member
    Join Date: Dec 2011
    Old 04-08-2013 , 13:53   Re: [CSS] Stop flashlight sound
    Reply With Quote #2

    I still have my idea to make a plug for the likeness of antiflood, with time interval

    Last edited by SHAREN; 04-08-2013 at 13:53.
    SHAREN is offline
    Send a message via Skype™ to SHAREN
    vodka00
    Veteran Member
    Join Date: Jun 2012
    Location: Los Angeles
    Old 04-09-2013 , 15:50   Re: [CSS] Stop flashlight sound
    Reply With Quote #3

    You could technically block other sounds in same way too? Such as death sound or jumping sound of other players or func_door sounds?
    __________________
    cw main:

    cw speedruns:
    vodka00 is offline
    iDragon
    Member
    Join Date: Aug 2010
    Old 04-10-2013 , 03:26   Re: [CSS] Stop flashlight sound
    Reply With Quote #4

    Quote:
    Originally Posted by vodka00 View Post
    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)
    __________________
    Sorry for my bad english.
    iDragon is offline
    vodka00
    Veteran Member
    Join Date: Jun 2012
    Location: Los Angeles
    Old 04-13-2013 , 17:04   Re: [CSS] Stop flashlight sound
    Reply With Quote #5

    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
    __________________
    cw main:

    cw speedruns:

    Last edited by vodka00; 04-13-2013 at 17:08.
    vodka00 is offline
    iDragon
    Member
    Join Date: Aug 2010
    Old 04-17-2013 , 06:05   Re: [CSS] Stop flashlight sound
    Reply With Quote #6

    Quote:
    Originally Posted by vodka00 View Post
    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() .
    __________________
    Sorry for my bad english.
    iDragon is offline
    GerardoLawson
    New Member
    Join Date: May 2013
    Old 05-22-2013 , 09:43   Re: [CSS] Stop flashlight sound
    Reply With Quote #7

    Quote:
    Originally Posted by iDragon View Post
    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

    Last edited by GerardoLawson; 05-23-2013 at 05:28.
    GerardoLawson is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 06-01-2013 , 19:15   Re: [CSS] Stop flashlight sound
    Reply With Quote #8

    Looks good. Approved.

    FYI, using FCVAR_REPLICATED can produce errors on the client; you might want to change that.
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work
    RedSword is offline
    pubhero
    Veteran Member
    Join Date: Aug 2012
    Location: Central Europe
    Old 06-02-2013 , 02:44   Re: [CSS] Stop flashlight sound
    Reply With Quote #9

    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.

    Last edited by pubhero; 06-02-2013 at 02:55.
    pubhero is offline
    NOTORIOUS7302
    Member
    Join Date: Nov 2018
    Location: Anonymous
    Old 08-29-2021 , 17:19   Re: [CSS] Stop flashlight sound
    Reply With Quote #10

    wait does it block sound for everyone or only everyone else except for you?
    NOTORIOUS7302 is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 08:32.


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