Raised This Month: $ Target: $400
 0% 

Gamemode Manager


Post New Thread Reply   
 
Thread Tools Display Modes
thesupremecommander
Member
Join Date: Apr 2012
Old 09-26-2013 , 11:52   Re: Gamemode Manager
Reply With Quote #11

Quote:
Originally Posted by Powerlord View Post
I'm going to test mine using a convar change hook on sm_nextmap. Having said that, I need to write a workaround for the nextmap plugin setting it on server start... don't want to try a vote then.

If that doesn't work, both UMC and MCE have public callbacks when they finish map votes... and MCE 1.10 was updated to pass the map back in this callback (gee... I wonder if my multimod plugin had anything to do with me adding that...).

Unfortunately, the stock Mapchooser doesn't fire any callbacks, but you can tell if it finished its vote via EndOfMapVoteEnabled() && HasEndOfMapVoteFinished() functions.

You'd have to do the usual OnLibraryAdded/OnLibraryRemoved/AllPluginsLoaded LibraryExists for all 3 to detect which one is in use.
It would probably be easier just to include subplugins at that point and ask the admins to install the ones they want/need for their server. Including all of them in one plugin will be messy and probably undesirable for certain admins.

Last edited by thesupremecommander; 09-29-2013 at 09:18. Reason: ack language how do I use it
thesupremecommander is offline
danne2
AlliedModders Donor
Join Date: Jul 2011
Location: Unoriginal computer joke
Old 09-26-2013 , 14:13   Re: Gamemode Manager
Reply With Quote #12

Thank you so much. I can finally stop relying on hacky map based cfgs.
danne2 is offline
thesupremecommander
Member
Join Date: Apr 2012
Old 10-04-2013 , 21:53   Re: Gamemode Manager
Reply With Quote #13

Plugin's been updated to 1.2.0 to fix some issues.
thesupremecommander is offline
doroemon
Senior Member
Join Date: Dec 2009
Location: TF2 AFK Server
Old 11-06-2013 , 08:07   Re: Gamemode Manager
Reply With Quote #14

hello everyone,
does this plugin will unload all plugin...?
and...how to...?
I using this in my TF2 server
(Sorry for my bad english
doroemon is offline
thesupremecommander
Member
Join Date: Apr 2012
Old 11-09-2013 , 10:19   Re: Gamemode Manager
Reply With Quote #15

If you just want to unload all plugins,
Code:
sm plugins unload_all
should work.

If you want to unload/load specific plugins during a mapchange, this plugin can do that.
thesupremecommander is offline
doroemon
Senior Member
Join Date: Dec 2009
Location: TF2 AFK Server
Old 11-15-2013 , 12:53   Re: Gamemode Manager
Reply With Quote #16

Quote:
Originally Posted by thesupremecommander View Post
If you just want to unload all plugins,
Code:
sm plugins unload_all
should work.

If you want to unload/load specific plugins during a mapchange, this plugin can do that.
Thanks for reply~
but.....how to unload all plugin in the default mode....?
I want to unload all plugin and add some plugin for it....
doroemon is offline
thesupremecommander
Member
Join Date: Apr 2012
Old 11-15-2013 , 18:19   Re: Gamemode Manager
Reply With Quote #17

You would probably have to use a configuration like this:

Code:
"gamemodes"
{
	"default"
	{
	}
	
	"everything-else"
	{
		"plugins"
		{
			"1"	"plugin1.smx"
			"2"	"plugin2.smx"
			"3"	"plugin3.smx"
		}
	}
}
Basically you would have to list all of the plugins you want to unload under "everything-else". Then before the map changes, you'd have to do
Code:
sm_nextgamemode default
and it would unload everything for you.

Let me know if that helps.

Last edited by thesupremecommander; 11-15-2013 at 18:20.
thesupremecommander is offline
doroemon
Senior Member
Join Date: Dec 2009
Location: TF2 AFK Server
Old 11-24-2013 , 03:58   Re: Gamemode Manager
Reply With Quote #18

Sorry I'm busy....so no have time to set....
I use a configuration like this:
Code:
"gamemodes"
{
	"default"
	{
	}

}
And set sm_nextgamemode "default"
but it doesn't unload plugin....Is my setting have any wrong....?
I using it with my TF2 Server...
P.S:Sorry for my bad english...
doroemon is offline
thesupremecommander
Member
Join Date: Apr 2012
Old 11-24-2013 , 09:35   Re: Gamemode Manager
Reply With Quote #19

Yeah, it shouldn't because it only loads any plugins listed in the file. That's why you need to create the "everything-else" section and list all of the plugins you want to unload in that.
thesupremecommander is offline
doroemon
Senior Member
Join Date: Dec 2009
Location: TF2 AFK Server
Old 12-01-2013 , 07:32   Re: Gamemode Manager
Reply With Quote #20

Hello again...
This is my gamemodes.cfg:
Code:
"gamemodes"
{
	"default"
	{
	}
	
	"everything-else"
	{
		"plugins"
		{
			"1"	"freezetag/freezetag.smx"
			"2"	"TF2Rank/TF2_Stats.smx"
			"3"	"Spycrab/Spycrab.smx"
		}
	}
}
And this is my plugin.gamemode-manager.cfg:
Code:
// the default gamemode to be loaded each map (for gamemode_manager_use_default 1)
// -
// Default: "vanilla"
gamemode_manager_default_gamemode "default"

// how map change should be handled if no gamemode was specifically set (0 - use gamemode of current map, 1 - use default gamemode specified by gamemode_manager_default_gamemode)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
gamemode_manager_use_default "1"
The plugin doesn't unload freezetag.smx,TF2_Stats.smx,Spycrab.smx

Does anything set worng....?
doroemon 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 17:57.


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