description="Provides methods of controllingg communication.",
version=SOURCEMOD_VERSION,
url="http://www.sourcemod.net/"
};
newbool:g_Muted[MAXPLAYERS+1];// Is the player muted?
newbool:g_Gagged[MAXPLAYERS+1];// Is the player gagged?
newHandle:g_Cvar_Deadtalk=INVALID_HANDLE;// Holds the handle for sm_deadtalk
newHandle:g_Cvar_Alltalk=INVALID_HANDLE;// Holds the handle for sv_alltalk
newbool:g_Hooked=false;// Tracks if we've hooked events for deadtalk
newHandle:hTopMenu=INVALID_HANDLE;
newg_GagTarget[MAXPLAYERS+1];
#include"basecomm/gag.sp"
publicOnPluginStart()
{
LoadTranslations("common.phrases");
LoadTranslations("basecomm.phrases");
g_Cvar_Deadtalk=CreateConVar("sm_deadtalk","0","Controls how dead communicate. 0 - Off. 1 - Dead players ignore teams. 2 - Dead players talk to living teammates.",0,true,0.0,true,2.0);
g_Cvar_Alltalk=FindConVar("sv_alltalk");
RegConsoleCmd("say",Command_Say);
RegConsoleCmd("say_team",Command_Say);
RegAdminCmd("sm_mute",Command_Mute,ADMFLAG_CHAT,"sm_mute <player> - Removes a player's ability to use voice.");
RegAdminCmd("sm_gag",Command_Gag,ADMFLAG_CHAT,"sm_gag <player> - Removes a player's ability to use chat.");
RegAdminCmd("sm_silence",Command_Silence,ADMFLAG_CHAT,"sm_silence <player> - Removes a player's ability to use voice or chat.");
RegAdminCmd("sm_unmute",Command_Unmute,ADMFLAG_CHAT,"sm_unmute <player> - Restores a player's ability to use voice.");
RegAdminCmd("sm_ungag",Command_Ungag,ADMFLAG_CHAT,"sm_ungag <player> - Restores a player's ability to use chat.");
RegAdminCmd("sm_unsilence",Command_Unsilence,ADMFLAG_CHAT,"sm_unsilence <player> - Restores a player's ability to use voice and chat.");