Raised This Month: $ Target: $400
 0% 

How to block 'server cvars x changed'


Post New Thread Reply   
 
Thread Tools Display Modes
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 04-07-2014 , 11:29   Re: How to block 'server cvars x changed'
Reply With Quote #11

https://forums.alliedmods.net/showthread.php?p=1756893
KyleS is offline
SilentBr
Veteran Member
Join Date: Jan 2009
Old 04-07-2014 , 15:17   Re: How to block 'server cvars x changed'
Reply With Quote #12

Quote:
Originally Posted by KyleS View Post
doesn't work for me. when my plugin changes the other plugin cvar still showing in chat

Quote:
sm_suppressconvar st_default_extra_health disabled
SilentBr is offline
SilentBr
Veteran Member
Join Date: Jan 2009
Old 04-07-2014 , 16:05   Re: How to block 'server cvars x changed'
Reply With Quote #13

Quote:
Originally Posted by sheo View Post
Best way:
Code:
public OnPluginStart()
{
	HookEvent("server_cvar", SilentEvent, EventHookMode_Pre);
}

public Action:SilentEvent(Handle:event, const String:name[], bool:dontBroadcast)
{
	SetEventBroadcast(event, true);
	return Plugin_Continue;
}
If you need to hide changes of only specified cvars you can retrieve cvar names from the event and hide only that ones you need to
Thank you it's working

Last edited by SilentBr; 04-07-2014 at 16:29.
SilentBr 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 19:01.


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