variable from server config
Hi,
How do i get a self defined variable from the default server.cfg? Best regards |
Re: variable from server config
could you give an example?
|
Re: variable from server config
Thanks for your quick answer.
From cstrike/server.cfg Code:
hlds_serverid 13Code:
new serverid; |
Re: variable from server config
do you register it in another plugin?
|
Re: variable from server config
nah probably not :)
I am writing my own plugin and are just trying to get a cvar from the main server config that is loaded with hlds but maybe its not as easy as i thought ;p |
Re: variable from server config
The cvar needs to be registered before it will work
|
Re: variable from server config
Untested. If this doesn't work, type "amx_showrcon amxx list" without the quotes in your console and output the result in [code] tags.
Code:
The config file should look like this and be located in your cstrike dir. If you'd like it in your config directory then just tell me. You asked for server.cfg so I figured you'd want it in here. Code:
;cvar_name valueSorry if I made any careless typos in the code. |
Re: variable from server config
Thx for your good answer and code but does not that code loop through the entire config grepping everything inside cause i got alot of stuff in that config :)?
Is there any way to get a startup variable which i define when i run hlds_run for example? Thx again for your time |
Re: variable from server config
You just confused me. Could you explain it a little clearer, please?
|
Re: variable from server config
Wow, this makes no sense. All you need to do is register the cvar in the plugin. It's super easy.
|
| All times are GMT -4. The time now is 03:35. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.