register_cvar with -console option
I've a question regarding register_cvar when running hlds.exe with the -console option. I have the code below and the value of my_cvar is initialised to what I specify when starting a HLDS instance (in +servercfgfile) but it's not picking it up when I start the server with -console.
Do I need to do something else when using the -console option? Using Metamod 1.91 and AMX Mod X 1.81. PHP Code:
|
Re: register_cvar with -console option
I've tried it also with the vanilla server.cfg for cstrike. The same thing happens: the plugin doesn't pick up the value of the my_cvar in server.cfg when running with -console.
The command I used to start the HLDS instance doesn't do anything out of the ordinary: hlds.exe -console +log on -game cstrike -ip 127.0.0.1 +port 3000 +clientport 3000 server.cfg // Use this file to configure your DEDICATED server. // This config file is executed on server start. // disable autoaim sv_aim 0 // disable clients' ability to pause the server pausable 0 // default server name. Change to "Bob's Server", etc. hostname "Counter-Strike 1.6 Server" // maximum client movement speed sv_maxspeed 320 // 20 minute timelimit mp_timelimit 20 sv_cheats 0 // load ban files //exec listip.cfg //exec banned.cfg my_cvar 1 map de_dust Changing the order of the my_cvar declaration in server.cfg doesn't help either, I've observed. Is it something else perhaps? It can't be just me experiencing this, now could it? |
Re: register_cvar with -console option
I decided to workaround this by keying off the builtin HLDS cvars instead.
|
Re: register_cvar with -console option
I'm able to read the value of the plugin defined cvar after moving the map option from the configuration file to the start cmd, thanks to Lev2001 on the bug tracker.
I'm unable to read the value in plugin_init/plugin_cfg, and able to do so only after the first round has started on the server. I was under the impression that the value would have been loaded prior to plugin_init as I don't find anything on the docs that would indicate otherwise. Is this expected behaviour? Or should I have been able to read it in plugin_init? |
Re: register_cvar with -console option
When do you realize that no one answers you?
|
| All times are GMT -4. The time now is 17:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.