AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   help with const... trying to limit a cvar (https://forums.alliedmods.net/showthread.php?t=93116)

31m0_owns 05-24-2009 15:01

help with const... trying to limit a cvar
 
Hello I looked at exolents jumpstats plugin and i found something i could use to block/limit interp just wondering

PHP Code:

new const g_client_cvar_names[][] =
{
    
"developer",
    
"fps_max",
    
"cl_forwardspeed",
    
"cl_sidespeed",
    
"cl_backspeed"
};

new const 
g_client_cvar_values[sizeof(g_client_cvar_names)] =
{
    
0,
    
101,
    
400,
    
400,
    
400 


fysiks 05-24-2009 15:22

Re: help with const... trying to limit a cvar
 
So . . . What's the question?

SnoW 05-24-2009 15:53

Re: help with const... trying to limit a cvar
 
Quote:

Originally Posted by fysiks (Post 833881)
So . . . What's the question?

Guessing from the topic name, he's trying to limit them somehow to cvars? and wants help with that, aye.
Edit: The topic says a cvar.
He's trying to limit those to a one cvar.
That's the truth.

31m0_owns 05-24-2009 16:46

Re: help with const... trying to limit a cvar
 
Yes thnx for explaning snow... Cause my friends and i play usptactics so I needed to make them a plugin that limits the value of a cvar

31m0_owns 05-24-2009 17:06

Re: help with const... trying to limit a cvar
 
In better terms of what i need to do... its just something basic i came up with but i get errors when i compile please help

PHP Code:

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
set_cvar_float("ex_interp"Float:0.01),
    
set_cvar_num("ex_interp""0.01"),
    
set_cvar_string("ex_interp""0,01"


Bugsy 05-24-2009 20:22

Re: help with const... trying to limit a cvar
 
set_cvar_float( "ex_interp" , 0.01 );

or

set_cvar_string( "ex_interp" , "0.01" );


All times are GMT -4. The time now is 01:27.

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