AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   Disable Alltalk change announce? (https://forums.alliedmods.net/showthread.php?t=183479)

egor1908 04-22-2012 08:45

Disable Alltalk change announce?
 
Hi, does anyone know if it's possible to disable sv_alltalk changes announcement in chat?

Preferrebly with a plugin.

mcpan313 04-22-2012 13:45

Re: Disable Alltalk change announce?
 
Code:

NotifytConVar(FindConVar("sv_alltalk"), false);
PHP Code:

stock NotifytConVar(Handle:hndlbool:notify)
{
    new 
flags GetConVarFlags(hndl);

    if (
notify)
        
flags |= FCVAR_NOTIFY;
    else
        
flags &= ~FCVAR_NOTIFY;

    
SetConVarFlags(hndlflags);



egor1908 04-23-2012 19:10

Re: Disable Alltalk change announce?
 
Thanks, I will try it and then report back. If you don't hear from me, everything is good :)

egor1908 04-26-2012 05:33

Re: Disable Alltalk change announce?
 
Quote:

NotifytConVar(FindConVar("sv_alltalk"), false);
Should I use this OnPluginStart or OnMapLoad (I now use OnPluginStart)?

The code worked by the way, thanks.

PS: If I want it to reset flags when unloaded OnPluginEnd(), what command can i use to set the flag back?

donrevan 04-26-2012 06:09

Re: Disable Alltalk change announce?
 
just use true instead of false

Code:

NotifytConVar(FindConVar("sv_alltalk"), true);

Dr. McKay 04-26-2012 12:58

Re: Disable Alltalk change announce?
 
This'll still show the sv_tags change notification, won't it?

Powerlord 04-26-2012 16:13

Re: Disable Alltalk change announce?
 
Quote:

Originally Posted by Dr. McKay (Post 1696860)
This'll still show the sv_tags change notification, won't it?

The notify flag for convars doesn't affect sv_tags.

Having said that... rule of thumb, don't remove things from sv_tags else you risk bringing Valve's wrath down upon you.

See Also: Valve's Policy of Truth.

Dr. McKay 04-26-2012 16:51

Re: Disable Alltalk change announce?
 
Quote:

Originally Posted by Powerlord (Post 1696979)
The notify flag for convars doesn't affect sv_tags.

Having said that... rule of thumb, don't remove things from sv_tags else you risk bringing Valve's wrath down upon you.

See Also: Valve's Policy of Truth.

Yes, of course. I'd never remove anything from sv_tags. I'm just pointing out that although you removed the notify flag from sv_alltalk, sv_tags still has the notify flag, so changing alltalk still prints a notification.


All times are GMT -4. The time now is 18:54.

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