Is it possible to check/set/whatever a dvar like, maxfps() instead of getdvar("com_maxfps")?
Is it possible to check/set/whatever a dvar like, maxfps() instead of getdvar("com_maxfps")?
You can rename the dvar's with a hex editor like WinHex
timescale 0.01
What I mean is, check the actual dvar value and not get the value of example 'com_maxfps'. Because people can change com to con etc. Just wondering if there is a way to check without going through getdvar
I thought about a generic way, but there isn't much room for a solution. Though com_maxfps could be detected with a trick:
Set it to e.g. 2 with player setclientcvar("com_maxfps", "2") and then watch the ping. If ping goes up: test succeeded
Of course you can't read the ping without any extension, but I rent servers with it: http://killtube.org/forumdisplay.php?37-Hosting
Alternativly you can use B3 to control the ping, wrote an easy to understand introduction for that: http://killtube.org/showthread.php?1...Command-Adding!
timescale 0.01
I don't really know what you are talking about because some of the things you've said are not correct. So, talking about dvars in general:
1. You cannot permanently change the name of a dvar. These are in the engine. The only way to permanently change them is through hacking the executable, or reverse engineering the game back to source, changing what you want, then recompiling. However, you can redefine them in script.
2. The only way to get the value of a dvar is with getCvar()/getDvar() (depending on which game you are talking about).
3. You cannot get the value of a dvar for a client, as their is no getClientCvar()/getClientDvar() function in any COD game. Whenever you use getCvar()/getDvar(), it will return the value for the whole server, not for any particular client. The only way to get a the value of a dvar for a particular client is to custom-make the dvar for the client - for example by putting their entity number on the end of it - and when you get it's value, it will be for that client simply because it has an extension which is unique to a particular client.
Last edited by Tally; 23rd May 2013 at 12:02.
maxFPS() would not be a dvar - it would be a function. You can define your own functions in COD script to replace any built-in COD engine function. For example, this is a redefinition of setCvar():
It extends the range of setCvar() to include checking map names, gametypes names, or both, when setting a dvar.PHP Code:
setCvarDef( dvar, value )
{
mapname = getCvar ("mapname");
if (isdefined (level.gametype))
gametype = level.gametype;
else
gametype = getCvar ("g_gametype");
suffixed_dvar = dvar + "_" + gametype + "_" + mapname;
setCvar (suffixed_dvar, value);
}
Last edited by Tally; 23rd May 2013 at 12:09.
Just search the name of a cvar with a hex editor and change com_maxfps to lol_maxfps e.g. and it would render some detection methods useless. You dont need to recompile anything. The manipulation of software is called cracking (http://en.wikipedia.org/wiki/Software_cracking).
To change the fps, the "hacker" would do this to change his fps: set lol_maxfps 125
Thats how my detection method would work, because this wouldn't affect anything, and that can be detected: player setclientcvar("com_maxfps", "2");
After the test, which can be done in 1 second e.g. the choosen fps can be set (125, 250 etc.)
The actual 2-fps-detection could be done with many ways I guess.
timescale 0.01
Sorry, tried to post yesterday but site wouldn't let me..
To change the dvar, all you need to do is edit the .exe as kung foo said, com_maxfps can be changed to lol_maxfps as with all other ones, and then the command com_maxfps with come up with 'external dvar', and wont do anything in the game
What I was asking if there is a function to change/use/check the value of the max fps without using the dvar, which i guess is impossible or very hard
I think you want to limit the maxfps for players (its useful e.g. for a jump mod).
The easiest way would be make an infinity cycle, where you set a value for the cvar in every frame.
That can be bypassed by editing the dvar in the .exe though