AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [L4D2] I want to clear the [cvar] message in the server chat window. (https://forums.alliedmods.net/showthread.php?t=317655)

login101 07-22-2019 15:49

[L4D2] I want to clear the [cvar] message in the server chat window.
 
Suppresses ConVars from printing to clients when they change.


I used the plugin,
A message is displayed.


Is there any other way? ㅠ

Psyk0tik 07-22-2019 21:30

Re: [L4D2] I want to clear the [cvar] message in the server chat window.
 
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

Lux 07-22-2019 23:38

Re: [L4D2] I want to clear the [cvar] message in the server chat window.
 
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

login101 07-22-2019 23:51

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

Originally Posted by Crasher_3637 (Post 2660262)
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 07-23-2019 00:29

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

Originally Posted by Lux (Post 2660274)
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.

jeremyvillanueva 03-14-2021 15:38

Re: [L4D2] I want to clear the [cvar] message in the server chat window.
 
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

Darkwob 03-19-2021 18:32

Re: [L4D2] I want to clear the [cvar] message in the server chat window.
 
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 ?

Marttt 03-19-2021 20:32

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

Originally Posted by Lux (Post 2660274)
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



caphao1101 03-10-2024 11:37

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

Originally Posted by login101 (Post 2660275)
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"

HarryPotter 03-10-2024 12:57

Re: [L4D2] I want to clear the [cvar] message in the server chat window.
 
try this one
https://github.com/fbef0102/L4D1_2-P...master/bequiet


All times are GMT -4. The time now is 14:31.

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