Raised This Month: $ Target: $400
 0% 

better way to declare CVARs


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gamer99
Senior Member
Join Date: Jul 2011
Old 07-14-2011 , 15:12   Re: better way to declare CVARs
Reply With Quote #1

sry for the one second confudion .. the should be one frame .. ..

I was trying to avoid that calling every frame ...
gamer99 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-14-2011 , 15:17   Re: better way to declare CVARs
Reply With Quote #2

Something like this:

PHP Code:
new g_pCvar
new g_iCvarValue

// plugin_init()
    
g_pCvar register_cvar("mycvar""1")

// plugin_cfg() // You can use any recurring function here like new round or round end or whatever
    
g_iCvarValue get_pcvar_num(g_pCvar)

// client_prethink()
    
if( g_iCvarValue == )
    
// ...  Use it how ever you need here. 
__________________
fysiks is offline
gamer99
Senior Member
Join Date: Jul 2011
Old 07-14-2011 , 15:43   Re: better way to declare CVARs
Reply With Quote #3

superb idea fysiks and bibu ... love u man
gamer99 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 01:07.


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