gm_cvar alternative

I’m looking for a way to manipulate FCVAR flags on CVARs. gm_cvar2 did this fine, but it hasn’t been updated in over 3 years and no longer works. Someone picked it up and renamed it to gm_cvar3, and it has updates up until last month, but I can’t get the module to load.

Sourcemod is able to do this also, but Metamod won’t load on GM13 (it used to work on GM12), I’m guessing Garry removed the Source plugin system.

All I need is FCVAR_NOT_CONNECTED to be removed from fps_max (so I can change the framerate ingame) and FCVAR_CHEAT removed from r_farz (so huge maps are able to fully render.)

If anyone has a method to change cvar flags, I’d greatly appreciate it if you shared.

http://mfsinc.googlecode.com/svn/trunk/VC/gmsv_cvar3_win32/gmsv_cvar3_win32/

This works perfectly for me, make sure you have VC2010 redistributable

Well I got it to load now, but it appears the functions have changed because none of my old code wants to work.

I’m doing this:


cvar3.SetFlags("fps_max", cvar3.GetFlags("fps_max") - FCVAR_NOT_CONNECTED)

I’m guessing that isn’t right.

CVar3 adds the functions to the ConVar metatable, try this:


GetConVar("fps_max"):SetFlags( GetConVar("fps_max"):GetFlags() - FCVAR_NOT_CONNECTED)

Isn’t using gm_cvar3 bannable now?

Only if you change sv_allowcslua/sv_cheats AFAIK, since it’s a legit usable module.

That works, thanks.

There’s a version of gm_cvar3 for modifying convars clientside, that one will get you banned. I’m doing it on the server side so there aren’t any problems.