Read server launch options (registered cvar)
Is it possible to set non existent cvar (cvar registered only in plugin) from server launch options and then read it from plugin? I guess not? I'm trying to accomplish that but without success! :/
|
Re: Read server launch options (registered cvar)
What exactly are you trying to do? Don't tell me the method you "think" is the solution, tell me what you want the end result to be.
|
Re: Read server launch options (registered cvar)
create a cfg and add to the console startup +exec config.cfg
|
Re: Read server launch options (registered cvar)
That would still execute around the same time the servercfgfile executes, which is after the cvars are registered
|
Re: Read server launch options (registered cvar)
Adding cvar to config file is not an option! I need to pass cvar with launch options like so
Code:
hlds.exe -game cstrike -console +mycvar 3 +map de_dust2Code:
It works only if cvar is defined in configs, but like I said, it's not an option for me. I guess it do not work because "mycvar" is not standard HL cvar and plugin is not executed at that time, so server do not keep record of that var? I hope Im wrong! So, how can I read cvar from server startup parameters? ty! |
Re: Read server launch options (registered cvar)
Explain us why you 'need' to do that and you'll get better answers. I'm sure there are other ways of doing what you want.
|
Re: Read server launch options (registered cvar)
One way to do that is by connecting to database. Each time server runs, it gets different variable value. Server will be launched remotely by cmd. There is no option to write new config file each time.
|
Re: Read server launch options (registered cvar)
Quote:
|
Re: Read server launch options (registered cvar)
Server will be launched remotely several times a day! There is need for setting one cvar (registered in plugin) with different value each time server starts. There is no option to write cvar in server config file so it should be passed with launch options or when plugins starts it reads it from database.
Sorry for lack of info. This cvar defines the tournament id for server. I will stick to database option, because I have to poll additional data from db any way.. . like players, teams etc. |
| All times are GMT -4. The time now is 05:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.