Thread: [Release] Math Credits
View Single Post
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 06-22-2015 , 13:14   Re: Math Credits
Reply With Quote #9

Quote:
Originally Posted by Arkarr View Post
@r3dw3r3w0lf
Right, in fact, I scripted this without knowing anything about Store (wich was not that clever, I understand.) but, what ?
It's recommended that all modules register & refresh each plugin load.
What does that part mean ? Like I have to do ServerCommand("sm plugins reload [PLUGIN_NAME]"); after Store_RegisterPluginModule() ?
I'll re-type it but basically, it means it will register the module every time you input the function and update the settings in the web panel. This must be refreshed so the web panel can track which versions are running on which servers and tell you otherwise if they're outdated.

I'm making a post about it now since It's needed now but basically, this is how you should code it.

(Taken from the core module)
Code:
public Store_OnDatabaseInitialized()
{
	Store_RegisterPluginModule(PLUGIN_NAME, PLUGIN_DESCRIPTION, PLUGIN_VERSION_CONVAR, STORE_VERSION);
}
Everytime the database initializes, It'll register the plugin to the database for the web panel to use. If the version is the same, It'll just refresh stuff like the name, description, etc.

Last edited by Drixevel; 06-22-2015 at 13:14.
Drixevel is offline