Raised This Month: $ Target: $400
 0% 

Loading CVARs from mysql, check my logic please


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OldWolf
Member
Join Date: Mar 2009
Old 04-04-2009 , 22:32   Loading CVARs from mysql, check my logic please
Reply With Quote #1

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
OldWolf is offline
Old 04-05-2009, 02:23
OldWolf
This message has been deleted by YamiKaitou. Reason: bump
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 04-06-2009 , 11:20   Re: Loading CVARs from mysql, check my logic please
Reply With Quote #3

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
__________________
Hunter-Digital is offline
OldWolf
Member
Join Date: Mar 2009
Old 04-06-2009 , 17:12   Re: Loading CVARs from mysql, check my logic please
Reply With Quote #4

Oh hey, that sounds perfect, I'll look into that. Thanks!
OldWolf is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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