AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Quostion bout changing cvar (https://forums.alliedmods.net/showthread.php?t=153157)

JocAnis 03-19-2011 14:45

Quostion bout changing cvar
 
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

urban_ninja 03-19-2011 15:00

Re: Quostion bout changing cvar
 
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

JocAnis 03-19-2011 15:01

Re: Quostion bout changing cvar
 
Quote:

Originally Posted by urban_ninja (Post 1435982)
PHP Code:

public cvar_checker() 

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



:crab::crab::crab:

ConnorMcLeod 03-19-2011 15:03

Re: Quostion bout changing cvar
 
Arkshine is working on something like this, just wait.

urban_ninja 03-19-2011 15:10

Re: Quostion bout changing cvar
 
What are you trying to do exactly? I take it your not trying to create a cvar enforcer plugin after you replied with craps.


All times are GMT -4. The time now is 14:34.

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