Raised This Month: $ Target: $400
 0% 

Global Shared CVARS - How To ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
sawce
The null pointer exception error and virtual machine bug
Join Date: Oct 2004
Old 06-06-2007 , 10:19   Re: Global Shared CVARS - How To ?
Reply With Quote #9

Quote:
Originally Posted by kurian View Post
So what your saying is that I can simply write

Code:
amx_override_spec = register_cvar("amx_override_spec","1")
So the first time the function is called, the CVAR will be created and its value will be set to 1. Then suppose the user changes the value to 0 by typing amx_override_spec 0 in console. Then if the function is executed again in another plugin, it will simply return a CVAR pointer and the value will still remain at 0 even though register_cvar re initializes it with a value of 1 ?


If so then this seems to be the best option. Because I CANNOT add any code in the plugins themselves, everything must be contained in the include file.
Correct.
__________________
fyren sucks
sawce 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 10:41.


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