Raised This Month: $32 Target: $400
 8% 

~fcvar_notify


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 09-23-2012 , 16:09   ~fcvar_notify
Reply With Quote #1

I already look around but all i found is disable notify in chat message.

My case is different, i want to disable the code below from spaming the console but no effect. Any idea?

PHP Code:
new silent GetCommandFlags"z_spawn_const_pos" );
SetCommandFlags"z_spawn_const_pos"silent & ~FCVAR_NOTIFY );

//some code

SetCommandFlags"z_spawn_const_pos"silent ); 
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.
GsiX is offline
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 09-23-2012 , 16:16   Re: ~fcvar_notify
Reply With Quote #2

Thats not the way it works.
PHP Code:
new silent GetCommandFlags"z_spawn_const_pos" );
silent &= ~FCVAR_NOTIFY;
SetCommandFlags"z_spawn_const_pos"silent );

//some code

SetCommandFlags"z_spawn_const_pos"silent ); 
Haven't tested and im tired, so no guarantee.

Yours sincerely
Impact
__________________

Last edited by Impact123; 09-23-2012 at 16:16.
Impact123 is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 09-23-2012 , 16:21   Re: ~fcvar_notify
Reply With Quote #3

It's still spamming and ruin the code functionality.

before the code apply
PHP Code:
Constant z_spawn position set to -1325.0000002658.0000002544.000000

after the code apply
PHP Code:
Constant z_spawn position set to 0.0000000.0000000.000000
EDIT: sorry its doesn't ruin the code but it still spamming the console.
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.

Last edited by GsiX; 09-23-2012 at 16:39.
GsiX is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 09-23-2012 , 16:43   Re: ~fcvar_notify
Reply With Quote #4

If z_spawn_const_pos is indeed a command, you can't change it's output with a simple flag. You will have to do a hook on console or chat messages and block them. I've never done that so I'm not sure how to do this. Your first post removes the flag correctly though.
__________________
FaTony is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 09-23-2012 , 16:49   Re: ~fcvar_notify
Reply With Quote #5

i also did like this but same effect. The print to sever is not executed also throw no error.

PHP Code:
public OnPluginStart()
{
    
HookEvent("server_cvar"Event_ServerCvarEventHookMode_Pre);
}

public 
Action:Event_ServerCvar(Handle:event, const String:name[], bool:dontBroadcast)
{
    
PrintToServer"Event blocked" );
    return 
Plugin_Handled;


i got this ton on the console.

Quote:
Constant z_spawn position set to 2507.864502, 777.530518, 74.031250.
Constant z_spawn position set to 2235.711914, 795.638062, 74.031250.
Constant z_spawn position set to 2350.386719, -860.249268, 74.031250.
Constant z_spawn position set to 2337.446777, 904.609009, 74.031250.
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.

Last edited by GsiX; 09-23-2012 at 16:51.
GsiX is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 09-23-2012 , 16:52   Re: ~fcvar_notify
Reply With Quote #6

Is z_spawn_const_pos a command or variable?
__________________
FaTony is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 09-23-2012 , 16:55   Re: ~fcvar_notify
Reply With Quote #7

its a valve cvar required sv_cheats 1 to execute.

EDIT: command.
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.

Last edited by GsiX; 09-23-2012 at 16:56.
GsiX is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 09-23-2012 , 17:00   Re: ~fcvar_notify
Reply With Quote #8

Then as I said above, cvar logic doesn't really apply to commands, tbh I would really like a console print hook myself. I hope someone will post some info in the future.
__________________
FaTony is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 09-23-2012 , 17:06   Re: ~fcvar_notify
Reply With Quote #9

FCVAR_NOTIFY is meant for messages like "mp_friendlyfire changed from 0 to 1".
bl4nk is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 09-23-2012 , 17:10   Re: ~fcvar_notify
Reply With Quote #10

i try to overwrite it but it throw me an error... lolx..

Quote:
public OnPluginStart()
{
Notify = CreateConVar("z_spawn_const_pos", " ");
}
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.

Last edited by GsiX; 09-23-2012 at 17:11.
GsiX 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 16:24.


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