Raised This Month: $ Target: $400
 0% 

Quostion bout changing cvar


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JocAnis
Veteran Member
Join Date: Jun 2010
Old 03-19-2011 , 14:45   Quostion bout changing cvar
Reply With Quote #1

hi, is there any event (or whatever) which is called when any cvar is changed?

i know one (really) bad solutions: with

PHP Code:
public plugin_init()
{
...
set_tasktime"cvar_checker")
}
public 
cvar_checker()
{
         if( 
get_pcvar_numcvar ) <= cvar_num )
                 
message"warning cvar is too small" //or what ever..

thanks in advance
JocAnis is offline
urban_ninja
Senior Member
Join Date: Feb 2009
Old 03-19-2011 , 15:00   Re: Quostion bout changing cvar
Reply With Quote #2

PHP Code:
public cvar_checker() 

          if( 
get_pcvar_numcvar ) <= cvar_num )
          {
                   
client_cmd(id ,"cvar value")
          }

Where cvar is put client cvar and were value is put the value you want to enforce
__________________
urban_ninja is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 03-19-2011 , 15:01   Re: Quostion bout changing cvar
Reply With Quote #3

Quote:
Originally Posted by urban_ninja View Post
PHP Code:
public cvar_checker() 

          if( 
get_pcvar_numcvar ) <= cvar_num )
          {
                   
client_cmd(plr,"cvar value")
          }

JocAnis is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-19-2011 , 15:03   Re: Quostion bout changing cvar
Reply With Quote #4

Arkshine is working on something like this, just wait.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
urban_ninja
Senior Member
Join Date: Feb 2009
Old 03-19-2011 , 15:10   Re: Quostion bout changing cvar
Reply With Quote #5

What are you trying to do exactly? I take it your not trying to create a cvar enforcer plugin after you replied with craps.
__________________
urban_ninja 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 14:34.


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