AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Loading CVARs from mysql, check my logic please (https://forums.alliedmods.net/showthread.php?t=89334)

OldWolf 04-04-2009 22:32

Loading CVARs from mysql, check my logic please
 
Howdy all,

I'm working on a plugin right now that would gather cvars out of a mysql table and load them to the server. I just need a little help with it.

1. How do I initiate the function at the right time so that it overwrites any of the cvars in the config files?
If I list it as the final plugin in the plugins file and include the function in plugin_init, will that hit at the right time, or is there a better way to do it?
Note that it needs to happen before the server loads the first map, so that the settings apply to that map.
2. If the above is correct, will that work for each map load?

Thanks!
James

Hunter-Digital 04-06-2009 11:20

Re: Loading CVARs from mysql, check my logic please
 
from what I know (never done this)... you can do the mysql query and get the cvars in the plugin_cfg() ... that function is called whenever all plugins and configurations are loaded.. or something :P

OldWolf 04-06-2009 17:12

Re: Loading CVARs from mysql, check my logic please
 
Oh hey, that sounds perfect, I'll look into that. Thanks!


All times are GMT -4. The time now is 02:21.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.