Raised This Month: $ Target: $400
 0% 

execute function on changed cvar


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
stupok
Veteran Member
Join Date: Feb 2006
Old 10-05-2006 , 20:55   execute function on changed cvar
Reply With Quote #1

I want a function to be executed when a cvar is changed. This should be possible by some means, since you can notify the players in the server if the cvar has been changed.

Cvar Flags:
#define FCVAR_ARCHIVE 1 /* set to cause it to be saved to vars.rc */
#define FCVAR_USERINFO 2 /* changes the client's info string */
#define FCVAR_SERVER 4 /* notifies players when changed */
#define FCVAR_EXTDLL 8 /* defined by external DLL */
#define FCVAR_CLIENTDLL 16 /* defined by the client dll */
#define FCVAR_PROTECTED 32 /* It's a server cvar, but we don't send the data since it's a password, etc. Sends 1 if it's not bland/zero, 0 otherwise as value */
#define FCVAR_SPONLY 64 /* This cvar cannot be changed by clients connected to a multiplayer server. */
#define FCVAR_PRINTABLEONLY 128 /* This cvar's string cannot contain unprintable characters ( e.g., used for player name etc ). */
#define FCVAR_UNLOGGED 256 /* If this is a FCVAR_SERVER, don't log changes to the log file / console if we are creating a log */

EDIT: I found register_logevent(), but do not know how to use it... so I'll play around with it. Please post the proper way to do this.

Last edited by stupok; 10-05-2006 at 21:10.
stupok is offline
 



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 04:51.


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