Raised This Month: $51 Target: $400
 12% 

[ANY] Unloader


Post New Thread Reply   
 
Thread Tools Display Modes
Author
thecount
Veteran Member
Join Date: Jul 2013
Plugin ID:
5022
Plugin Version:
1.0
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Disable certain plugins per map.
    Old 01-28-2016 , 23:15   [ANY] Unloader
    Reply With Quote #1

    Unloader allows server owners to disable plugins per each individual map. If you would like a certain plugin to be active on most maps but disabled on others, this plugin will help. It was originally a private request, but permission was given to release it publicly.

    How to use: There is a configuration file in sourcemod/configs/unloader.cfg that will or can be created. The plugin has a built-in command to add configurations via console, but the cfg file can also be made from scratch. If you want to write it yourself, the layout is
    Code:
    [PLUGIN_NAME] : [MAP1], [MAP2], [MAP3], etc...
    //Example:
    ThirdPerson : ctf_turbine, de_dust2, de_mirage
    Commands:
    • sm_unload "Plugin" "Map1" "Map2" ...

    Just drag and drop into plugins folder then use the command to configure it. Problems may arise if you attempt to make multiple configurations for 1 plugin. To fix this, the cfg file would need to be altered or deleted.
    Attached Files
    File Type: sp Get Plugin or Get Source (Unloader.sp - 725 views - 3.9 KB)

    Last edited by thecount; 01-28-2016 at 23:16.
    thecount is offline
    DarkDeviL
    SourceMod Moderator
    Join Date: Apr 2012
    Old 01-28-2016 , 23:41   Re: [ANY] Unloader
    Reply With Quote #2

    As always, thank you for sharing your stuff.

    To the negative end, I see no reasons for things like this. You can simply place your plugins in the plugins/diasbled folder, and use map configs to execute "sm plugins load disabled/WHATEVER" in order to load the plugins only when you want to.

    Even though this is supposed in the opposite direction, I'd still say it is a technical waste to load the plugins, only just to find out that they should get unloaded again.
    __________________
    Mostly known as "DarkDeviL".

    Dropbox FastDL: Public folder will no longer work after March 15, 2017!
    For more info, see the [SRCDS Thread], or the [HLDS Thread].
    DarkDeviL is offline
    thecount
    Veteran Member
    Join Date: Jul 2013
    Old 01-29-2016 , 08:12   Re: [ANY] Unloader
    Reply With Quote #3

    This sort of assumes you want the plugin loaded for most maps when the disabled folder assumes the opposite. I understand that it is somewhat irrelevant, but it's here in case someone wants it.
    thecount is offline
    sneaK
    SourceMod Moderator
    Join Date: Feb 2015
    Location: USA
    Old 01-29-2016 , 12:22   Re: [ANY] Unloader
    Reply With Quote #4

    Will this plugin help me avoid model precache table limit crash? I need to unload my whole store plugin to avoid crashes on certain maps, I just can't find a way to to do it before the models are all precached.
    sneaK is offline
    thecount
    Veteran Member
    Join Date: Jul 2013
    Old 01-29-2016 , 12:26   Re: [ANY] Unloader
    Reply With Quote #5

    Quote:
    Originally Posted by blackhawk74 View Post
    Will this plugin help me avoid model precache table limit crash? I need to unload my whole store plugin to avoid crashes on certain maps, I just can't find a way to to do it before the models are all precached.
    I believe it should. Please test and give some feedback.
    thecount is offline
    sneaK
    SourceMod Moderator
    Join Date: Feb 2015
    Location: USA
    Old 01-29-2016 , 20:32   Re: [ANY] Unloader
    Reply With Quote #6

    I attempted to use sm_unload in-game and it immediately crashed my server. Nothing in the error logs :/
    sneaK is offline
    thecount
    Veteran Member
    Join Date: Jul 2013
    Old 01-29-2016 , 21:47   Re: [ANY] Unloader
    Reply With Quote #7

    Quote:
    Originally Posted by blackhawk74 View Post
    I attempted to use sm_unload in-game and it immediately crashed my server. Nothing in the error logs :/
    Very odd. I'm not sure what could have caused this unless there is a problem reading files among various operating systems. Are you using Windows for your server or something else?
    thecount is offline
    FishDude
    Member
    Join Date: Jul 2014
    Old 01-30-2016 , 02:22   Re: [ANY] Unloader
    Reply With Quote #8

    Whats about no plugin solution? map_name.cfg contains 'sm plugins unload bla-bla-bla'.
    FishDude is offline
    DarkDeviL
    SourceMod Moderator
    Join Date: Apr 2012
    Old 01-30-2016 , 05:57   Re: [ANY] Unloader
    Reply With Quote #9

    Quote:
    Originally Posted by FishDude View Post
    Whats about no plugin solution? map_name.cfg contains 'sm plugins unload bla-bla-bla'.
    Both this plugin and that map thing with "sm plugins unload" will make the plugin load, and then unload it afterwards. So if you have problems that come with just loading a plugin, they will still come both ways.

    The way to prevent such would be the opposite direction, to make a "whitelist" of plugins to load:

    Place your problem-plugin.smx in disabled/ folder, so it is always "disabled" (never loaded automatically).

    For all maps that would need problem-plugin, you'll execute "sm plugins load disabled/problem-plugin" from that map's config.
    __________________
    Mostly known as "DarkDeviL".

    Dropbox FastDL: Public folder will no longer work after March 15, 2017!
    For more info, see the [SRCDS Thread], or the [HLDS Thread].
    DarkDeviL is offline
    ddhoward
    Veteran Member
    Join Date: May 2012
    Location: California
    Old 01-30-2016 , 19:16   Re: [ANY] Unloader
    Reply With Quote #10

    Quote:
    Originally Posted by arne1288 View Post
    Both this plugin and that map thing with "sm plugins unload" will make the plugin load, and then unload it afterwards. So if you have problems that come with just loading a plugin, they will still come both ways.

    The way to prevent such would be the opposite direction, to make a "whitelist" of plugins to load:

    Place your problem-plugin.smx in disabled/ folder, so it is always "disabled" (never loaded automatically).

    For all maps that would need problem-plugin, you'll execute "sm plugins load disabled/problem-plugin" from that map's config.
    You would need to unload all plugins OnMapEnd() though, right? Otherwise plugins will continue to operate once loaded on a map on which is whitelisted, even through the next map may not have a whitelist at all.
    __________________
    ddhoward 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 15:43.


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