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 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"
}
}
}
Attached Files
File Type: sp Get Plugin or Get Source changemode.sp
Source AlliedModders