[CS:GO] ChangeMode

Post Reply
in_so@pta
Administrator
Posts: 1074
Joined: Mon Jul 06, 2009 7:38 am
Jucator SA:MP ?: Da
Nick:: in_so@pta
Jucator CS ?: Da
Contact:

[CS:GO] ChangeMode

Post by in_so@pta »

This is a modification of SouceMod's randomcycle plugin. It will both randomize your map cycle and allow you to switch game modes in-game, automatically selecting a new custom map cycle for each mode and randomly selecting a map from that list to change to.
Admin commands to change the game mode and select a new map from a custom maplist.

The command is
Code:

Code: Select all

sm_changemode_[gametype] [mapcyclefile].txt
The gametypes are armsrace, casual, competitive, deathmatch, and demolition. For example: sm_changemode_deathmatch mapcycle_deathmatch.txt

The casual game mode uses the original mapcycle.txt by default. You will need to create the additional following text files in your base directory:

mapcycle_competitive.txt
mapcycle_armsrace.txt
mapcycle_demolition.txt
mapcycle_deathmatch.txt

Some maps do not support classic modes (ar_ maps and some de_ maps). These should be reserved for deathmatch, demolition, and arms race cycles. Otherwise, you'll be pistols-only unless you use a mod like the Buy Zone Simulator.
I also recommend you download Show The Right Next Map , otherwise the wrong maps will be displayed to players in-game.

To select modes in-game, add the following to your adminmenu_custom.txt file:
Code:

Code: Select all

"Commands"
{
	"Game Modes"
	{
		"Arms Race Mode"
		{
			"cmd"			"sm_changemode_armsrace mapcycle_armsrace.txt"
			"admin"			"sm_kick"
			"execute"		"server"
		}
		"Casual Mode"
		{
			"cmd"			"sm_changemode_casual mapcycle.txt"
			"admin"			"sm_kick"
			"execute"		"server"
		}
		"Competitive Mode"
		{
			"cmd"			"sm_changemode_competitive mapcycle_competitive.txt"
			"admin"			"sm_kick"
			"execute"		"server"
		}
		"Deathmatch Mode"
		{
			"cmd"			"sm_changemode_deathmatch mapcycle_deathmatch.txt"
			"admin"			"sm_kick"
			"execute"		"server"
		}
		"Demolition Mode"
		{
			"cmd"			"sm_changemode_demolition mapcycle_demolition.txt"
			"admin"			"sm_kick"
			"execute"		"server"
		}
		"Random Map (Current Mode)"
		{
			"cmd"			"sm_changemap"
			"admin"			"sm_kick"
			"execute"		"server"
		}
	}
}
Update, v. 1.3 - Corrected errors with every mode loading the casual config.
Attached Files
File Type: sp Get Plugin or Get Source changemode.sp
Source AlliedModders
Post Reply

Return to “Admin Commands”