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

Any way to make sm_cvar changes not appear in chat?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jamsessionein
Junior Member
Join Date: Oct 2009
Old 02-25-2010 , 18:36   Any way to make sm_cvar changes not appear in chat?
Reply With Quote #1

I'm tinkering around with L4D2, and I'm wondering if there's any way to use the sm_cvar command that won't end up showing the message announcing the variable's change.
jamsessionein is offline
Cooltad
Veteran Member
Join Date: Apr 2008
Old 02-25-2010 , 19:05   Re: Any way to make sm_cvar changes not appear in chat?
Reply With Quote #2

I think taking away the NOTIFY flag in the basecommands plugin would do the trick.
__________________
Please, give me some rep if you found what I posted useful. :]
Cooltad is offline
jamsessionein
Junior Member
Join Date: Oct 2009
Old 02-25-2010 , 20:10   Re: Any way to make sm_cvar changes not appear in chat?
Reply With Quote #3

Combing through basecommands.sp doesn't show the word NOTIFY anywhere. Am I missing something?
jamsessionein is offline
Afronanny
Veteran Member
Join Date: Aug 2009
Old 02-25-2010 , 21:29   Re: Any way to make sm_cvar changes not appear in chat?
Reply With Quote #4

Try the "Search" feature.
I found this topic on Page 1 of this forum:

http://forums.alliedmods.net/showthread.php?t=78571
Afronanny is offline
jamsessionein
Junior Member
Join Date: Oct 2009
Old 02-25-2010 , 23:37   Re: Any way to make sm_cvar changes not appear in chat?
Reply With Quote #5

Ah, I'd searched, but still managed to miss that thread.

Still, I'm not finding that thread overwhelmingly helpful in solving my issue. Pulling the basic plugin from there, I have the following:

Code:
public Plugin:myinfo =
{
    name = "sv_tags squelcher",
    author = "bl4nk",
    description = "Squelches the change in sv_tags via chat",
    version = "1.0.0",
    url = "http://forums.alliedmods.net"
};

public OnPluginStart()
{
    new flags, Handle:cvar = FindConVar("sb_all_bot_team");
    
    flags = GetConVarFlags(cvar);
    flags &= ~FCVAR_NOTIFY;
    SetConVarFlags(cvar, flags);

    CloseHandle(cvar);
}
The point is to make any changes to the cvar sb_all_bot_team silent, but it doesn't seem to be, well, working. What obvious thing am I missing, here?

Last edited by jamsessionein; 02-26-2010 at 01:46.
jamsessionein 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 09:46.


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