Help on a server_cmd
During the init of a plugin, I would like to get two values from a file, (abc.cfg) under amx conf directory.
Code:
public plugin_init() {Code:
ip_common "210.245.126"However, it always returns me the default value, 127.0.0.1 I went throught the tutorial, but no good news. Thanks for any suggestions. |
Re: Help on a server_cmd
What do you trying to do?
you set a cvar to change what? |
Re: Help on a server_cmd
The difference between your version and admin.sma is that the new cvar value is read inside a function called by a server command.
Commands sent with server_cmd() aren't executed immediately and that's why get_cvar_string() is reading the old value. You could try using server_exec() after server_cmd() or you could copy the workaround in admin.sma. |
Re: Help on a server_cmd
cl@d, I want read a CVAR from a file instead of hardcoding.
Lee, your suggestion is nice, but I changed this to: Code:
public plugin_init() { |
Re: Help on a server_cmd
Code:
|
Re: Help on a server_cmd
Thats a smart way of doing it, Lee.
|
Re: Help on a server_cmd
Thanks, Lee. It works. Cheers!
Really appreciate your kind help. ^_^ |
| All times are GMT -4. The time now is 16:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.