Quote:
Originally Posted by Arkarr
@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.