Raised This Month: $51 Target: $400
 12% 

Disable Alltalk change announce?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
egor1908
Veteran Member
Join Date: Sep 2009
Old 04-22-2012 , 08:45   Disable Alltalk change announce?
Reply With Quote #1

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

Preferrebly with a plugin.
egor1908 is offline
mcpan313
Senior Member
Join Date: Mar 2010
Old 04-22-2012 , 13:45   Re: Disable Alltalk change announce?
Reply With Quote #2

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);

__________________
sorry, for my poor english.
mcpan313 is offline
Send a message via MSN to mcpan313
egor1908
Veteran Member
Join Date: Sep 2009
Old 04-23-2012 , 19:10   Re: Disable Alltalk change announce?
Reply With Quote #3

Thanks, I will try it and then report back. If you don't hear from me, everything is good

Last edited by egor1908; 04-23-2012 at 19:11.
egor1908 is offline
egor1908
Veteran Member
Join Date: Sep 2009
Old 04-26-2012 , 05:33   Re: Disable Alltalk change announce?
Reply With Quote #4

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?

Last edited by egor1908; 04-26-2012 at 05:49.
egor1908 is offline
donrevan
AlliedModders Donor
Join Date: Jul 2010
Old 04-26-2012 , 06:09   Re: Disable Alltalk change announce?
Reply With Quote #5

just use true instead of false

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

Last edited by donrevan; 04-26-2012 at 06:10.
donrevan is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 04-26-2012 , 12:58   Re: Disable Alltalk change announce?
Reply With Quote #6

This'll still show the sv_tags change notification, won't it?
__________________
Dr. McKay is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 04-26-2012 , 16:13   Re: Disable Alltalk change announce?
Reply With Quote #7

Quote:
Originally Posted by Dr. McKay View Post
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.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 04-26-2012 at 16:14.
Powerlord is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 04-26-2012 , 16:51   Re: Disable Alltalk change announce?
Reply With Quote #8

Quote:
Originally Posted by Powerlord View Post
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.
__________________
Dr. McKay 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 21:24.


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