View Single Post
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 05-17-2019 , 22:40   Re: Polymorph: Mod Manager
Reply With Quote #981

Using the same /addons/ folder is more convenient since I just share everything plugin, config, lang, etc related, I use a plugins-common.ini and various plugins_[x].ini files depending on the server (selected by a different AMXX core file).

But this is outside the topic of conversation.

Since you are already editing plugins-polymorph.ini at the end of the map it would be efficient to empty the file on map start to at least reduce the chance of other servers from loading it.

Adding this block of code at the end of plugin_cfg() seems to do the trick.
Code:
//clean the file to prevent other servers from loading it new szMainFilePath[STRLEN_PATH] new pMainFile get_configsdir(szMainFilePath, charsmax(szMainFilePath)) format(szMainFilePath, charsmax(szMainFilePath), "%s/plugins-polymorph.ini", szMainFilePath) pMainFile = fopen(szMainFilePath, "wt"); if(pMainFile) {     fclose(pMainFile) }
__________________

Last edited by gabuch2; 05-17-2019 at 22:53.
gabuch2 is offline