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

Map config -> enable plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NiGHTFiRE
Senior Member
Join Date: Dec 2004
Location: Sweden
Old 06-01-2010 , 05:28   Map config -> enable plugin
Reply With Quote #1

Hiya,
I know all about the map configs, and that you can enable/disable different cvars depending on the map.
What I'm wondering is, is it possible to enable certain plugin in a map config? And then on every other map it's disabled.

If that works, how would one go about doing this?

Thanks
NiGHTFiRE is offline
Send a message via AIM to NiGHTFiRE Send a message via MSN to NiGHTFiRE
Nomarky
SourceMod Donor
Join Date: Sep 2007
Old 06-01-2010 , 05:55   Re: Map config -> enable plugin
Reply With Quote #2

Quote:
Originally Posted by NiGHTFiRE View Post
Hiya,
I know all about the map configs, and that you can enable/disable different cvars depending on the map.
What I'm wondering is, is it possible to enable certain plugin in a map config? And then on every other map it's disabled.

If that works, how would one go about doing this?

Thanks
What I do is have the plugin loaded, then unload it on the maps I DON'T want it running on using sm plugins unload in a map config. Hope that helps
Nomarky is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 06-01-2010 , 10:41   Re: Map config -> enable plugin
Reply With Quote #3

When server launched and after map change.
SourceMod load all plugins automatically from
Code:
...addons/sourcemod/plugins/

and from sub -folders example 
...addons/sourcemod/plugins/my_new_folder/
Except one.
Plugins what are in disabled folder
Code:
...addons/sourcemod/plugins/disabled/
and sub -folders from there
Those plugins not run until you manually load them.
Using command sm plugins load disabled/plugin_name.smx

- So try in map config add that sm plugins load disabled/plugin_name.smx
- And add also in ...cfg/server.cfg command sm plugins unload disabled/plugin_name.smx

If I don't remember wrong when certain map appears, server execute first
server.cfg = where is unload command
after then map config (...maps/cfg/map_name.cfg) = where you load plugin.

*edit
Then of course, map change to other where is no "plugin load command" in map config and server.cfg unload plugins.

*edit
Some (old) plugins maybe crash server when unload or load back.
So try "benchmark" that plugins before you start using it about this way.


*secondedit
I tried also build this kind, plugin change depend time of the week
But almost succeed
[Hint & Tip] Schedule server cfg & plugins (unfinished)

Last edited by Bacardi; 06-01-2010 at 13:38.
Bacardi 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 19:08.


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