Raised This Month: $99 Target: $400
 24% 

[L4D2] Gag4Spec


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mr. Zero
Veteran Member
Join Date: Jun 2009
Location: Denmark
Plugin ID:
1180
Plugin Version:
1.1
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    33 
    Plugin Description:
    Prevent spectaters from using all chat (say command) while the game is active. Can ungag on different conditions.
    Old 09-24-2009 , 14:31   [L4D2] Gag4Spec
    Reply With Quote #1

    Gag4Spec

    About:
    This is a requested plugin by spiderlemur in "[L4D] Gag Spectators" thread.

    Simple plugin. Hook different events and allow and disallow the say command for spectators.
    Description:
    Prevent spectaters from using all chat (say command) while the game is active. Can ungag on different conditions.
    Features:
    • No chat for spectators
      The 'say' command is blocked while the game is active. Can be adjust so if they use the 'say' command it will be redirected to 'say_team' command.
    • Ungag on conditions
      The 'say' command can be enabled again while the survivors are still in safe room, the rescue vehicle is taking off, survivors dies or upon round end.
    • Player immunity
      Admins and players can be made immune so they wont be gaged while the game is on.

    Cvars:
    A configuration file will be automatically created for you upon first run, in /cfg/sourcemod/ called Gag4Spec.cfg

    Code:
    // Sets whether Gag4Spec is active
    // -
    // Default: "1"
    l4d_g4s_enable "1"
    
    // Immunity level required from admin to protect against gagging while game is active. 0 to disable immunity from gagging
    // -
    // Default: "0"
    l4d_g4s_gagimmunity "0"
    
    // Sets whether say commands gets redirected to say_team, for Spectators, while the game is active. 0 to disable redirect.
    // -
    // Default: "1"
    l4d_g4s_redirect "1"
    
    // Sets whether Spectators is allowed to all chat when the survivors looses.
    // -
    // Default: "1"
    l4d_g4s_ungag_lost "1"
    
    // Sets whether Spectators is allowed to all chat when the rescue vehicle is taking off.
    // -
    // Default: "1"
    l4d_g4s_ungag_rescued "1"
    
    // Sets whether Spectators is allowed to all chat when a round is ending (scores are being displayed).
    // -
    // Default: "1"
    l4d_g4s_ungag_roundend "1"
    
    // Sets whether Spectators is allowed to all chat while survivors still haven't left saferoom.
    // -
    // Default: "1"
    l4d_g4s_ungag_safe "1"
    Changelog:
    Code:
    Version 1.1 - 2012-06-23
    ~ Fixed an issue with Infected players walking out the safe area and marking the game as active.
    ~ Fixed & cleaned up the code
    
    Version 1.0
    ~ Fixed the admin immunity problem
    ~ Updated various small parts
    
    Version 0.92
    ~ Fixed root not being able to use say
    
    Version 0.91
    + Added immunity level, l4d_g4s_gagimmunity
    ~ Added FCVAR_DONTRECORD & FCVAR_REPLICATED to the version cvar
    
    Version 0.9
    Released
    Attached Files
    File Type: sp Get Plugin or Get Source (Gag4Spec.sp - 613 views - 6.1 KB)

    Last edited by Mr. Zero; 06-23-2012 at 09:35.
    Mr. Zero is offline
    DotDeath
    Junior Member
    Join Date: Jul 2009
    Old 10-27-2009 , 05:56   Re: [L4D] Gag4Spec
    Reply With Quote #2

    Could you add admin immunity on this? Thanks.
    DotDeath is offline
    Mr. Zero
    Veteran Member
    Join Date: Jun 2009
    Location: Denmark
    Old 10-27-2009 , 08:23   Re: [L4D] Gag4Spec
    Reply With Quote #3

    Here you go mate, added immunity level.

    Code:
    Version 0.91
    + Added immunity level, l4d_g4s_gagimmunity
    ~ Added FCVAR_DONTRECORD & FCVAR_REPLICATED to the version cvar
    Mr. Zero is offline
    DotDeath
    Junior Member
    Join Date: Jul 2009
    Old 10-28-2009 , 09:39   Re: [L4D] Gag4Spec
    Reply With Quote #4

    Thanks a lot!
    DotDeath is offline
    Antithasys
    Moderator
    Join Date: Apr 2008
    Old 10-28-2009 , 15:31   Re: [L4D] Gag4Spec
    Reply With Quote #5

    Well written. Good job
    __________________
    [my plugins]

    When you think about asking a question... consider what have you tried?
    Antithasys is offline
    DotDeath
    Junior Member
    Join Date: Jul 2009
    Old 10-30-2009 , 05:42   Re: [L4D] Gag4Spec
    Reply With Quote #6

    There is a bug:

    When you type:
    "say hi" on the console in the Source Dedicated Server after any of the events triggered: Leaving the safe room, etc., it would show:

    Code:
    [SM] Native "GetClientTeam" reported: Client index 0 is invalid
    I suggest that
    Code:
    IsClientConnected(client)
    IsClientInGame(client)
    IsFakeClient(client)
    checks should be done.
    DotDeath is offline
    Mr. Zero
    Veteran Member
    Join Date: Jun 2009
    Location: Denmark
    Old 10-31-2009 , 01:57   Re: [L4D] Gag4Spec
    Reply With Quote #7

    Added root check.
    Mr. Zero is offline
    Mr. Zero
    Veteran Member
    Join Date: Jun 2009
    Location: Denmark
    Old 06-23-2012 , 09:32   Re: [L4D2] Gag4Spec
    Reply With Quote #8

    Updated the script after TrueSurvivor contacted me the other day. Minor fixes and just patching up the old code.

    Code:
    Version 1.1 - 2012-06-23
    ~ Fixed an issue with Infected players walking out the safe area and marking the game as active.
    ~ Fixed & cleaned up the code
    Mr. Zero is offline
    malathion
    New Member
    Join Date: May 2012
    Old 08-03-2012 , 17:28   Re: [L4D2] Gag4Spec
    Reply With Quote #9

    Can you please make this suppress the on-screen notification of spectators changing their names? Some people have been harassing players using this loophole.
    malathion 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 22:47.


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