Raised This Month: $32 Target: $400
 8% 

Simple Mute-All Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Pilo
AlliedModders Donor
Join Date: Jan 2019
Location: Israel
Plugin ID:
6456
Plugin Version:
1.0
Plugin Category:
Server Management
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Simple Mute-All Plugin to mute all players and un-mute all players temporary. With cvar to change prefix!.
    Old 03-03-2019 , 12:54   Simple Mute-All Plugin
    Reply With Quote #1

    Simple Mute All Plugin By Pilo

    Simple plugin to mute all players in the server.
    With option to change prefix with a cvar!

    PHP Code:
    cfg/sourcemod/muteall.cfg 
    Cvars :

    PHP Code:
    "sm_muteall_prefix" (Default > "[SM]"Allow you to change plugin prefix

    Commands :


    PHP Code:
    "sm_muteall" (Mute all players)
    "sm_unmuteall" (Un-mute all players)
    "sm_mutet" (Mute Terrorist (To unmute terrorist type "sm_unmuteall"))
    "sm_mutect" (Mute Counter-Terrorist (To unmute ct type "sm_unmuteall")) 

    You can't mute admins with this!


    Feel free to ask me for more commands or anything!
    Can add me on steam : Pilo
    Attached Files
    File Type: zip MuteAll.zip (7.4 KB, 342 views)
    File Type: sp Get Plugin or Get Source (MuteAll.sp - 809 views - 3.2 KB)

    Last edited by Pilo; 03-03-2019 at 12:58.
    Pilo is offline
    Cruze
    Veteran Member
    Join Date: May 2017
    Old 03-03-2019 , 13:04   Re: Simple Mute-All Plugin
    Reply With Quote #2

    !mute @all
    !unmute @all
    !mute @t
    !mute @ct
    __________________
    Taking paid private requests! Contact me
    Cruze is offline
    Pilo
    AlliedModders Donor
    Join Date: Jan 2019
    Location: Israel
    Old 03-03-2019 , 13:13   Re: Simple Mute-All Plugin
    Reply With Quote #3

    Quote:
    Originally Posted by Cruze View Post
    !mute @all
    !unmute @all
    !mute @t
    !mute @ct
    I think it's more easy to use /mutect or /mutet.. If you want it I can add it.. don't see a reason for it anyway..
    Pilo is offline
    Cruze
    Veteran Member
    Join Date: May 2017
    Old 03-03-2019 , 14:13   Re: Simple Mute-All Plugin
    Reply With Quote #4

    Quote:
    Originally Posted by Pilo View Post
    I think it's more easy to use /mutect or /mutet.. If you want it I can add it.. don't see a reason for it anyway..
    Commands that I mentioned already exists.
    __________________
    Taking paid private requests! Contact me
    Cruze is offline
    Pilo
    AlliedModders Donor
    Join Date: Jan 2019
    Location: Israel
    Old 03-03-2019 , 14:23   Re: Simple Mute-All Plugin
    Reply With Quote #5

    Quote:
    Originally Posted by Cruze View Post
    Commands that I mentioned already exists.
    Oh, just ignore me.. xD
    Pilo is offline
    xoxo_
    Junior Member
    Join Date: Sep 2018
    Location: Israel
    Old 05-03-2019 , 05:52   Re: Simple Mute-All Plugin
    Reply With Quote #6

    Cool plugin ;)
    xoxo_ is offline
    eyal282
    Veteran Member
    Join Date: Aug 2011
    Old 11-20-2021 , 13:28   Re: Simple Mute-All Plugin
    Reply With Quote #7

    Code:
    #define PLUGIN_AUTHOR "Pilo, Edit by Eyal282"
    #define PLUGIN_VERSION "1.0"
    
    #include <sourcemod>
    #include <sdktools>
    #include <cstrike>
    #include <basecomm>
    
    #pragma newdecls required
    #pragma semicolon 1
    
    ConVar g_cvarPrefix;
    char g_sPrefix[32];
    
    public Plugin myinfo = 
    {
        name = "Mute-All Players",
        author = PLUGIN_AUTHOR,
        description = "Mute-All",
        version = PLUGIN_VERSION,
        url = "https://forums.gamers-israel.co.il/"
    };
    
    public void OnPluginStart()
    {
        RegAdminCmd("sm_muteall", Command_MuteAll, ADMFLAG_GENERIC, "Mute-All");
        RegAdminCmd("sm_unmuteall", Command_UnMuteAll, ADMFLAG_GENERIC, "Un-Mute All");
        RegAdminCmd("sm_mutet", Command_MuteT, ADMFLAG_GENERIC, "Mute Terrorist");
        RegAdminCmd("sm_mutect", Command_MuteCT, ADMFLAG_GENERIC, "Mute Counter-Terrorist");
        RegAdminCmd("sm_unmutet", Command_UnMuteT, ADMFLAG_GENERIC, "Un-Mute Terrorist");
        RegAdminCmd("sm_unmutect", Command_UnMuteCT, ADMFLAG_GENERIC, "Un-Mute Counter-Terrorist");
    
        g_cvarPrefix = CreateConVar("sm_muteall_prefix", "[SM] » ", "The tag applied before plugin messages. If you want no tag, you can set an empty string here.");
        g_cvarPrefix.AddChangeHook(cvarChange_Prefix);
        g_cvarPrefix.GetString(g_sPrefix, sizeof(g_sPrefix));
    
        AutoExecConfig(true, "muteall");
    }
    
    public void cvarChange_Prefix(ConVar convar, const char[] oldValue, const char[] newValue) {
        Format(g_sPrefix, sizeof(g_sPrefix), newValue);
    }
    
    public Action Command_MuteAll(int client, int args)
    {
        PrintToChatAll("%s \x07%N\x01 has muted all \x06players\x01", g_sPrefix, client);
        for (int i = 1; i <= MaxClients; i++)
        {
            if (IsClientInGame(i) && !BaseComm_IsClientMuted(i) && IsPlayerAlive(i))
            {
            	if (!CheckCommandAccess(i, "sm_admin", ADMFLAG_GENERIC, true))
            	{
                SetClientListeningFlags(i, VOICE_MUTED);
               }
            }
        }
        return Plugin_Handled;
    }
    
    public Action Command_UnMuteAll(int client, int args)
    {
        PrintToChatAll("%s \x07%N\x01 has un-muted all \x06players\x01", g_sPrefix, client);
        for (int i = 1; i <= MaxClients; i++)
        {
            if (IsClientInGame(i) && !BaseComm_IsClientMuted(i))
            {
            	if (!CheckCommandAccess(i, "sm_admin", ADMFLAG_GENERIC, true))
            	{
                SetClientListeningFlags(i, VOICE_NORMAL);
               }
            }
        }
        return Plugin_Handled;
    }
    
    public Action Command_MuteT(int client, int args)
    {
        PrintToChatAll("%s \x07%N\x01 has muted all \x02Terrorist\x01", g_sPrefix, client);
        for (int i = 1; i <= MaxClients; i++)
        {
            if (IsClientInGame(i) && !BaseComm_IsClientMuted(i) && GetClientTeam(i) == CS_TEAM_T)
            {
            	if (!CheckCommandAccess(i, "sm_admin", ADMFLAG_GENERIC, true))
            	{
    				SetClientListeningFlags(i, VOICE_MUTED);
               }
            }
        }
        return Plugin_Handled;
    }
    
    public Action Command_MuteCT(int client, int args)
    {
        PrintToChatAll("%s \x07%N\x01 has muted all \x03Counter-Terrorist\x01", g_sPrefix, client);
        for (int i = 1; i <= MaxClients; i++)
        {
        	
            if (IsClientInGame(i) && !BaseComm_IsClientMuted(i) && GetClientTeam(i) == CS_TEAM_CT)
            {
            	if (!CheckCommandAccess(i, "sm_admin", ADMFLAG_GENERIC, true))
            	{
       				SetClientListeningFlags(i, VOICE_MUTED);
            	}
           }
    	}
        return Plugin_Handled;
    }
    
    public Action Command_UnMuteT(int client, int args)
    {
        PrintToChatAll("%s \x07%N\x01 has un-muted all \x06terrorists\x01", g_sPrefix, client);
        for (int i = 1; i <= MaxClients; i++)
        {
            if (IsClientInGame(i) && !BaseComm_IsClientMuted(i) && GetClientTeam(i) == CS_TEAM_T)
            {
            	if (!CheckCommandAccess(i, "sm_admin", ADMFLAG_GENERIC, true))
            	{
                	SetClientListeningFlags(i, VOICE_NORMAL);
               }
            }
        }
        return Plugin_Handled;
    }
    
    public Action Command_UnMuteCT(int client, int args)
    {
        PrintToChatAll("%s \x07%N\x01 has un-muted all \x06counter-terrorist\x01", g_sPrefix, client);
        
        for (int i = 1; i <= MaxClients; i++)
        {
            if (IsClientInGame(i) && !BaseComm_IsClientMuted(i) && GetClientTeam(i) == CS_TEAM_CT)
            {
            	if (!CheckCommandAccess(i, "sm_admin", ADMFLAG_GENERIC, true))
            	{
    				SetClientListeningFlags(i, VOICE_NORMAL);
               }
            }
        }
        return Plugin_Handled;
    }
    I added sm_unmutet and sm_unmutect, please test.

    Edit: The author is dead, refrain from asking for fixes and etc, but the plugin is too simple to throw errors and etc.
    __________________
    I am available to make plugins for pay.

    Discord: Eyal282#1334

    Last edited by eyal282; 11-20-2021 at 13:29.
    eyal282 is offline
    Reply



    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 18:01.


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