AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D2] Gag4Spec (https://forums.alliedmods.net/showthread.php?t=104518)

Mr. Zero 09-24-2009 14:31

[L4D2] Gag4Spec
 
1 Attachment(s)
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


DotDeath 10-27-2009 05:56

Re: [L4D] Gag4Spec
 
Could you add admin immunity on this? Thanks.

Mr. Zero 10-27-2009 08:23

Re: [L4D] Gag4Spec
 
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


DotDeath 10-28-2009 09:39

Re: [L4D] Gag4Spec
 
Thanks a lot!

Antithasys 10-28-2009 15:31

Re: [L4D] Gag4Spec
 
Well written. Good job :)

DotDeath 10-30-2009 05:42

Re: [L4D] Gag4Spec
 
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.

Mr. Zero 10-31-2009 01:57

Re: [L4D] Gag4Spec
 
Added root check.

Mr. Zero 06-23-2012 09:32

Re: [L4D2] Gag4Spec
 
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


malathion 08-03-2012 17:28

Re: [L4D2] Gag4Spec
 
Can you please make this suppress the on-screen notification of spectators changing their names? Some people have been harassing players using this loophole.


All times are GMT -4. The time now is 09:21.

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