Re: Configuring CVars from the command line
- Halflife doesn't allow you to set cvars which haven't actually been created yet, and as such, the command line can only be used to set cvars which exist in the engine itself.
You can use the method Metamod uses to set options on the command line, shown here: http://metamod.org/metamod.html#configuration
This method is the "localinfo" buffer, one of two "info" buffers available for server information, which mirror the client's "setinfo" buffer.
On the command line, use: +localinfo mysetting myvalue
Then, in your code, after creating your cvar, use the GetInfoKeyBuffer engine function (and the InfoKeyValue function) to get the localinfo buffer value for the "mysetting" key which you can then assign to your cvar.
A link to GetInfoKeyBuffer: http://metamod.org/engine_notes.html#GetInfoKeyBuffer
As the notes imply, you will want to pass NULL to GetInfoKeyBuffer in order to get the localinfo buffer.