Hi all!
sorry for my english (having none practice)
After that my plugin succesfully executed - i have next:
- If plugin.cfg doesn't exist then he created. (it's good)
- When i change my plugin-cvars via console - they are changed and plugin see it. (it's good)
- when i change my cvars in plugin.cfg. - my plugin not see it and always set cvars in default state (it's bad)
diggering sources in this forum and looking how another authors tryed to solve it i have selected some moments:
1. In "OnPluginStart"-function after creating convars and adding AutoExeConfig some authors also adding servercommand "exec" for plugin.cfg. But why? in normal-state AutoExeConfig must execute config without any actions.
2. Some authors adding own plugin's.cfg in to the sourcemod.cfg.
3. Some authors use "HookConVarChange" to keep in fresh own convars.
4. Some authors write that plugin.cfg execute after MapChange. (After this I have opened plugins.ini and i saw that all my plugins reloaded after MapChange). So, we're have that the plugin is started, changed cvars to default and wait mapchange to set cvars with "userconfig"-values but NEVER execute plugin.cfg. 'cause every next mapchange-cycle - he'll overwrite plugin-convars to default
Questions:
1. How to do it right?
2. Why sometimes AutoExecConfig create plugin.cfg but never execute him?
3. Why AutoExecConfig not execute plugin.cfg immediately?
P.S. This is my first reply on Forum.