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

[L4D2] I want to clear the [cvar] message in the server chat window.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
login101
Senior Member
Join Date: Sep 2017
Old 07-22-2019 , 15:49   [L4D2] I want to clear the [cvar] message in the server chat window.
Reply With Quote #1

Suppresses ConVars from printing to clients when they change.


I used the plugin,
A message is displayed.


Is there any other way? ㅠ

Last edited by login101; 07-22-2019 at 16:09.
login101 is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 07-22-2019 , 21:30   Re: [L4D2] I want to clear the [cvar] message in the server chat window.
Reply With Quote #2

PHP Code:
#include <sourcemod>

#pragma semicolon 1
#pragma newdecls required

public Plugin myinfo =
{
    
name "Quiet ConVar Changer",
    
description "Quietly change a ConVar's value.",
    
author "Psyk0tik (Crasher_3637)",
    
version "1.0",
    
url "http://forums.alliedmods.net/"
};

public 
void OnPluginStart()
{
    
RegAdminCmd("sm_qcvar"Command_QuietCvarADMFLAG_CONVARS"sm_qcvar <ConVar> <Value> - Quietly change a ConVar's value");
}

public 
Action Command_QuietCvar(int clientint args)
{
    if (
args || args 2)
    {
        
ReplyToCommand(client"[SM] Usage: sm_qcvar <ConVar> <Value> - Quietly change a ConVar's value");
        return 
Plugin_Handled;
    }

    
char sConVar[64];
    
GetCmdArg(1sConVarsizeof(sConVar));
    
ConVar cvSetting FindConVar(sConVar);
    if (
cvSetting != null)
    {
        switch (
args)
        {
            case 
1:
            {
                
char sValue[64];
                
cvSetting.GetString(sValuesizeof(sValue));
                
ReplyToCommand(client"[SM] Value of cvar \"%s\": \"%s\""sConVarsValue);
            }
            case 
2:
            {
                
char sValue[64];
                
GetCmdArg(2sValuesizeof(sValue));
                
int iFlags cvSetting.Flags;
                if (
iFlags FCVAR_NOTIFY)
                {
                    
cvSetting.Flags iFlags & ~FCVAR_NOTIFY;
                    
cvSetting.SetString(sValue);
                    
cvSetting.Flags iFlags|FCVAR_NOTIFY;
                }
                else
                {
                    
cvSetting.SetString(sValue);
                }

                
//LogAction(client, -1, "\"%L\" changed cvar (cvar \"%s\") (value \"%s\")", client, sConVar, sValue);
            
}
        }

        
delete cvSetting;
        return 
Plugin_Handled;
    }

    
ReplyToCommand(client"[SM] Invalid ConVar: %s"sConVar);
    return 
Plugin_Handled;

I've had this plugin for awhile.

Instead of sm_cvar use sm_qcvar
__________________

Last edited by Psyk0tik; 07-22-2019 at 21:32.
Psyk0tik is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 07-22-2019 , 23:38   Re: [L4D2] I want to clear the [cvar] message in the server chat window.
Reply With Quote #3

The sourcemod.cfg has stuff regarding that

Code:
// Specifies how admin activity should be relayed to users.  Add up the values
// below to get the functionality you want.
// 1: Show admin activity to non-admins anonymously.
// 2: If 1 is specified, admin names will be shown.
// 4: Show admin activity to admins anonymously.
// 8: If 4 is specified, admin names will be shown.
// 16: Always show admin names to root users.
// --
// Default: 13 (1+4+8)
sm_show_activity 16
I think using 16 will only show stuff to the root users "z" flag maybe
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D

Last edited by Lux; 07-22-2019 at 23:38.
Lux is offline
login101
Senior Member
Join Date: Sep 2017
Old 07-22-2019 , 23:51   Re: [L4D2] I want to clear the [cvar] message in the server chat window.
Reply With Quote #4

Quote:
Originally Posted by Crasher_3637 View Post
PHP Code:
#include <sourcemod>

#pragma semicolon 1
#pragma newdecls required

public Plugin myinfo =
{
    
name "Quiet ConVar Changer",
    
description "Quietly change a ConVar's value.",
    
author "Psyk0tik (Crasher_3637)",
    
version "1.0",
    
url "http://forums.alliedmods.net/"
};

public 
void OnPluginStart()
{
    
RegAdminCmd("sm_qcvar"Command_QuietCvarADMFLAG_CONVARS"sm_qcvar <ConVar> <Value> - Quietly change a ConVar's value");
}

public 
Action Command_QuietCvar(int clientint args)
{
    if (
args || args 2)
    {
        
ReplyToCommand(client"[SM] Usage: sm_qcvar <ConVar> <Value> - Quietly change a ConVar's value");
        return 
Plugin_Handled;
    }

    
char sConVar[64];
    
GetCmdArg(1sConVarsizeof(sConVar));
    
ConVar cvSetting FindConVar(sConVar);
    if (
cvSetting != null)
    {
        switch (
args)
        {
            case 
1:
            {
                
char sValue[64];
                
cvSetting.GetString(sValuesizeof(sValue));
                
ReplyToCommand(client"[SM] Value of cvar \"%s\": \"%s\""sConVarsValue);
            }
            case 
2:
            {
                
char sValue[64];
                
GetCmdArg(2sValuesizeof(sValue));
                
int iFlags cvSetting.Flags;
                if (
iFlags FCVAR_NOTIFY)
                {
                    
cvSetting.Flags iFlags & ~FCVAR_NOTIFY;
                    
cvSetting.SetString(sValue);
                    
cvSetting.Flags iFlags|FCVAR_NOTIFY;
                }
                else
                {
                    
cvSetting.SetString(sValue);
                }

                
//LogAction(client, -1, "\"%L\" changed cvar (cvar \"%s\") (value \"%s\")", client, sConVar, sValue);
            
}
        }

        
delete cvSetting;
        return 
Plugin_Handled;
    }

    
ReplyToCommand(client"[SM] Invalid ConVar: %s"sConVar);
    return 
Plugin_Handled;

I've had this plugin for awhile.

Instead of sm_cvar use sm_qcvar

I'll try it later. Thank you very much for giving me the answer. Thanks to you guys, l4d2 has fun.
login101 is offline
login101
Senior Member
Join Date: Sep 2017
Old 07-23-2019 , 00:29   Re: [L4D2] I want to clear the [cvar] message in the server chat window.
Reply With Quote #5

Quote:
Originally Posted by Lux View Post
The sourcemod.cfg has stuff regarding that

Code:
// Specifies how admin activity should be relayed to users.  Add up the values
// below to get the functionality you want.
// 1: Show admin activity to non-admins anonymously.
// 2: If 1 is specified, admin names will be shown.
// 4: Show admin activity to admins anonymously.
// 8: If 4 is specified, admin names will be shown.
// 16: Always show admin names to root users.
// --
// Default: 13 (1+4+8)
sm_show_activity 16
I think using 16 will only show stuff to the root users "z" flag maybe


I'll try it in the evening.
login101 is offline
jeremyvillanueva
AlliedModders Donor
Join Date: Jan 2021
Location: dcord:Jeremy333#7632
Old 03-14-2021 , 15:38   Re: [L4D2] I want to clear the [cvar] message in the server chat window.
Reply With Quote #6

Hi, I'm using this plugin
https://forums.alliedmods.net/showthread.php?t=140627

Command's response hiding works well
In the first game it wouldn't work with a cfg file because is loading
jeremyvillanueva is offline
Darkwob
BANNED
Join Date: Oct 2018
Old 03-19-2021 , 18:32   Re: [L4D2] I want to clear the [cvar] message in the server chat window.
Reply With Quote #7

when I use commands such as Slay, teleport on the server, it writes the process to the chat when I do them, I don't want anything to write to the chat. is there such a plugin etc ?
Darkwob is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 03-19-2021 , 20:32   Re: [L4D2] I want to clear the [cvar] message in the server chat window.
Reply With Quote #8

Quote:
Originally Posted by Lux View Post
The sourcemod.cfg has stuff regarding that

Code:
// Specifies how admin activity should be relayed to users.  Add up the values
// below to get the functionality you want.
// 1: Show admin activity to non-admins anonymously.
// 2: If 1 is specified, admin names will be shown.
// 4: Show admin activity to admins anonymously.
// 8: If 4 is specified, admin names will be shown.
// 16: Always show admin names to root users.
// --
// Default: 13 (1+4+8)
sm_show_activity 16
__________________

Last edited by Marttt; 03-19-2021 at 20:32.
Marttt is offline
caphao1101
Member
Join Date: Aug 2023
Old 03-10-2024 , 11:37   Re: [L4D2] I want to clear the [cvar] message in the server chat window.
Reply With Quote #9

Quote:
Originally Posted by login101 View Post
I'll try it later. Thank you very much for giving me the answer. Thanks to you guys, l4d2 has fun.
Have you tried it yet???
Does it turn off the notification line when editing cvar?
-> Example: [SM] Changed cvar "z_tank_attack_interval" to "0.3"
caphao1101 is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 03-10-2024 , 12:57   Re: [L4D2] I want to clear the [cvar] message in the server chat window.
Reply With Quote #10

try this one
https://github.com/fbef0102/L4D1_2-P...master/bequiet
__________________
HarryPotter 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 23:33.


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