• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Any way for admins to access/adjust cvars during runtime?

kanaverum

New member
Working on some mods lately -really starting to dig into cvars and feel kind of dumb for not noticing them before.

I had this expectation that I'd be able to read/adjust cvars with admin commands (turn on a flag for an event, etc.), but... am I blind, or are there no admin commands for making these kinds of adjustments?

 
Last edited by a moderator:
For now, we created buffs as 'admin triggers' that simply change state of a global cvar (one to enable and another to disable).

The downside is that this has to target a player who's currently logged in, which we should be able to do with server-side scripting and parsing the output of the admin `listplayers` (lp) command.

Not having to do this extra step would be awesome, but this is our current path forward if there really is no other way to impact cvar without requiring the admin to log in.

 
You can modify cvars with items, see my cvar club snippet in my previous posts. If you want to access a particular enitiy's cvars and they are available to you, there is some prefix to add to the cvar name, unsure of the syntaxes. Hope that helps!

 
Back
Top