If you're dealing with ConVars, you can directly change their values without using ServerCommand().
Code:
ConVar sv_autobunnyhopping = FindConVar( "sv_autobunnyhopping" );
if ( sv_autobunnyhopping != null ) {
sv_autobunnyhopping.BoolValue = true; // change sv_autobunnyhopping to "1"
}
sm_cvar is just an admin command to use in game (but you can also call it in code to change ConVar values, but that's not very effective).
You can use
find <name> command to find ConVars and commands. For example:
Code:
find mp_footsteps
"mp_footsteps" = "1"
game notify
if it prints equal sign and value - this is ConVar, otherwise this would be command.
You can also use
CommandExists to ensure that specified command is valid.
__________________