Auto Round Restart [autorr]
This plugin automates the process of restarting the game at the beginning of round 1 (resetting scores, players' money, round time, etc.). In plain English: with this plugin, you have the ability to have your server automatically restart the game at round 1 after X rounds or X minutes (use CVARS to control these options).
This is useful for the following types of servers:
- 24/7 "one map" servers
- Servers on maps with no objective and CSDM or auto-respawn running
- Clan or Scrim style servers
- Private Match servers
Pro's for 24/7 "one map" servers:
- Eliminate the need for map changes based on mp_timelimit or mp_maxrounds which reload the same map you are already on
- Eliminate players needing to reconnect because of pointless map changes back to the same map
- Keeps game flow continuous and does not interrupt the game like a map change does
- Does not waste time
- Is much less annoying than a map change yet still has the same capabilities
- Allows teams to be mixed up more often and easier to keep them from being stacked one way or another with all the good players
- If you want everyone to experience a "hand gun round" on a more frequent basis, you can be reassured and know that after X rounds or X minutes everyone will go through the first round again. This keeps people from constantly having $16,000 and everyone in the server being able to buy an AWP for many consecutive rounds in a row.
Pro's for servers on maps with no objectives (surf servers or others) with CSDM or auto respawn enabled
- Allows you to have the round/scores/etc. restarted after a given amount of time since round restarts will hardly happen on your server (no objective to end round + auto respawning = no round end hardly ever)
- No need to constantly monitor the server to restart the rounds or change back to the same map in order to mix up teams and reset scores before your actual map time has come to change maps (if you have mp_timelimit set to 60 you can restart rounds after 30 minutes with this plugin and stay on the same map for another 30 minutes, yet have scores restart halfway through automatically without a map change)
- By setting the time limit in the plugin to something small like 5 minutes (similar to normal round time), you can essentially eliminate possible cases of endless spawn killing in surf maps when admin are not present and one team is unable to kill a rule breaking spawn killer. Sometimes admin are not in the server to monitor players and enforce rules, and auto restarting the round would give everyone a fresh chance at surfing again every X minutes.
Pro's for Clan, Scrim, and Private Match servers:
- The manual admin command simplify scrims and make them an easy, effortless process.
- Auto-24/7 Scrim style play can simulate a never ending scrim environment for fun clans
- It is simply quicker and easier when you are doing an unofficial match or scrim to use this plugin. Type /lo3 and you're off. When the first half is over, type /switchall after each team is ready. Then type /lo3 again and the second half commences. Quick. Easy. Simple.
There are options that can work with the automatic round restart. This includes the following:
- Auto "Live On Three" - Automatically executes the traditional CAL style "Live On Three" restarts and server say text as seen in most scrims and matches at the beginning of each half.
- Not only is the "Live On Three" option useful to make your server unique and look cool when restarting rounds, but it INFORMS PLAYERS via chat that restarts are occurring and when the final restart has occurred! It is an excellent alternative to the normal, boring style of restarting, and properly informs players of what is going on at the same time.
- Auto "Switch All" - Automatically switches all players to the opposite team when an automatic round restart occurs.
- This is useful for continuous scrim style play and to make sure that everyone in your server gets a chance to play on both teams.
- Auto "Spec n' Choose." Instead of changing sv_restart to 1 or using Auto "Live On Three" to automatically restart the game at round 1, or using Auto "Switch All" to change all players to the opposite team, "Spec n Choose" sends all players to spectator after X rounds or X minutes and brings up the choose team menu for players to re-select what team they want to be on.
- This is useful to help keep the teams from staying the same. This gives people a CHANCE to get on the other team if they WANT to, and basically acts the exact same as a map change, minus the map change actually occurring (no reconnecting to get everyone back to the choose team menu; it's automated).
In addition, I have provided admin commands to manually restart the game at round 1 by changing sv_restart to 1 and manually execute "Live On Three", "Switch All", and "Spec n' Choose". These may come in handy for scrims against other clans or just when you wish to restart things for other purposes and don't want to wait for the automatic round restart events to occur.
This plugin was requested here
Switch Team Options
Switch Team Options include the following:
amx_switchall & say /switchall - Switches all players to the opposite team
amx_specnchoose & say /specnchoose - Sends everyone to spectate and brings up the choose team menu
autorr_autoswitchall - This is the option to automatically switch all players to the opposite team when an automatic round restart occurs
autorr_switchallkill - This is the option to kill all players before transferring them to the opposite team when a manual or Auto "Switch All" occurs
autorr_specnchoose - This is the option to automatically send all players to spectator and bring up the choose team menu when an automatic round restart occurs
Switch Team Options are enabled by default. To disable Switch Team Options, comment out the following line in the source
#define SWITCH_TEAM_OPTIONS // comment this line out to disable all switch team options
and recompile the plugin. By commenting out that line, all Switch Team Options will become disabled and the cstrike module will not be required to run this plugin.
Hud Toggle Option
The Hud Toggle Option includes the following:
say /hudoff - Removes the AutoRR Hud Message
say /hudon - Displays the AutoRR Hud Message
The Hud Toggle Option is enabled by default. To disable the Hud Toggle Option, comment out the following line in the source
#define ALLOW_HUD_TOGGLE // comment this line out to disable the hud toggle commands
and recompile the plugin. By commenting out that line, the Hud Toggle Option will become disabled and the nVault module will not be required to run this plugin.
- .\configs\lo3.cfg (only needed if you have autorr_lo3cfgfile set to 1)
Note: The cstrike module is NOT required if Switch Team Options have been disabled!!! Switch Team Options are ENABLED by default.
Note: The nVault module is NOT required if the Hud Toggle Option has been disabled!!! The Hud Toggle Option is ENABLED by default.
- Restarts the game at round 1
- Executes "Live On Three"
- Restarts the game at round 1 (just type /restart in chat)
- Executes "Live On Three" (just type /lo3 in chat)
The following Admin commands will be disabled if Switch Team Options are disabled. Switch Team Options are ENABLED by default.
- Switches all players to the opposite team
- Sends everyone to spectate and brings up the choose team menu
- Switches all players to the opposite team (just type /switchall in chat)
- Sends everyone to spectate and brings up the choose team menu (just type /specnchoose in chat)
- Displays how many rounds are left after the current round before an automatic round restart will occur (just type roundsleft in chat)
- Displays much time is left until an automatic round restart will occur (just type timeleftrr in chat)
The following Client commands will be disabled if the Hud Toggle Option is disabled. The Hud Toggle Option is ENABLED by default.
- Removes the AutoRR Hud Message (just type /hudoff in chat)
- Displays the AutoRR Hud Message (just type /hudon in chat)
Default for all CVARS is 0
Automatic Round Restarting
Note: The following CVARS will NOT affect automatic round restarts if autorr_enable is set to 0.
Note: autorr_time must be set to 0 to use this CVAR.
autorr_round <# of rounds>
- 0: Automatic Round Restarting is disabled
- 1: Automatic Round Restarting is enabled
Auto Restart Rounds
Note: autorr_round must be set to 0 to use this CVAR.
autorr_time <# of minutes> (note that this must be a whole number; i. e. not 30.5 minutes but rather 30 or 31)
- This is the number of rounds that can be played before an automatic round restart will occur
Auto Restart Time (in minutes)
Note: This CVAR will not work if autorr_time is set to 0. In addition, autorr_round must be set to 0 to use this CVAR.
- This is the number of minutes that can be played before an automatic round restart will occur
Auto Time Restart Wait
- 0: When the time limit set by autorr_time has been reached, an automatic round restart will occur right away even if it is in the middle of a round
- 1: When the time limit set by autorr_time has been reached, an automatic round restart will NOT occur right away. The automatic round restart will occur at the beginning of the next round after the time limit has been reached to avoid restarting mid-round.
Auto "Live On Three"
Note: This CVAR will not work if autorr_lo3 is set to 0. If you set this CVAR to 1, you must place your lo3.cfg in addons\configs\ folder. Also, the last restart in your lo3.cfg script must be sv_restart 3 or it will not be compatible with this plugin.
- 0: When an automatic round restart occurs, sv_restart will be changed to 1 only one time to restart the game at round 1 normally
- 1: When an automatic round restart occurs, the server will execute "Live On Three" to restart the game at round 1 in the same manner used in most CAL matches and scrims
Use lo3.cfg File
Note: If autorr_time is set to 1, autorr_timewaitround must be set to 1 to use this CVAR.
- 0: When lo3 restart occurs, the built in "Live On Three" script will run
- 1: When lo3 restart occurs, your custom lo3.cfg file will run
Say Last Round
- 0: No messages will ever be displayed informing players that this is the last round before the automatic round restart will occur.
- 1: When autorr_round is being used, a red hud message saying "This is the last round!" will be displayed at the beginning of the last round. If autorr_time is being used, that same message will be displayed as soon as the autorr_time has been reached (even if mid-round because in the next round an automatic round restart would occur - making that the final round)
The following Plugin CVARS will be disabled if Switch Team Options are disabled. Switch Team Options are ENABLED by default.
- 0: No Hud Message will be displayed
- 1: A constant Hud Message will be displayed showing minutes/rounds left
Auto "Switch All"
- 0: When an automatic round restart occurs, players will stay on the same team
- 1: When an automatic round restart occurs, all players will automatically be switched to the opposite team
Switch All Kill
Note: If you enable this CVAR, "Spec n' Choose", the CVARS autorr_lo3 and autorr_autoswitchall will never be used because this overrides the actual server restart by sending players to spectator and showing them the choose team menu instead (which results in the game restarting at round 1 also).
- 0: Players will not be killed before being transferred to the opposite team in a "Switch All" event
- 1: Players will be killed before being transferred to the opposite team in a "Switch All" event (only useful for the "Switch All" admin commands)
Spec n' Choose
- 0: When an automatic round restart occurs, players will NOT be sent to spectator or shown the choose team menu
- 1: When an automatic round restart occurs, players WILL be sent to spectator and WILL be shown the choose team menu automatically (this WILL result in the game restarting at round 1)
- Mordekay - German Translation
- Fr3ak0ut - Swedish Translation (awaiting final translation)
- ZiP* - Danish Translation (awaiting final translation)
- trawiator and dzek - Polish Translation
- Janet Jackson - Dutch Translation (awaiting final translation)
- ZmifF - Russian Translation
To use mp_timelimit to still change maps after a given time frame, follow these steps:
1. Place mp_timelimit # in amxx.cfg. Example: If you want the map to change after 30 minutes then put mp_timelimit 30 in amxx.cfg.
2. If you use any Admin commands to restart the round, the timelimit will be reset as normal and there is nothing I can do about that. Just like if you did rcon sv_restart 1, the timelimit will reset as normal.
What does this mean? If you put mp_timelimit # (where # is the number of minutes you want for the timelimit) in amxx.cfg and don't use Admin commands to restart the rounds, then the map will change as normal after the time limit has been reached.
- Fixed possible bug with Russian translation. Fixed bug where servers that used mp_timelimit did not change due to auto round restarts. mp_timelimit is now grabbed prior to all auto round restarts and reset to the value it was at before the auto round restart to ensure that mp_timelimit is not affected by the automated functionality of this plugin.
- Added Hud CVAR, Hud Toggle Option/Commands, lo3 custom .cfg CVAR, polished up a few lines of code
- Did away with lo3.cfg being a separate file and added functions to handle the "Live On Three" event within the plugin instead. With this version lo3.cfg is no longer needed at all.
- Changed instances of #define macros for strings to new const string variables. Changed instances of format to formatex. Changed instances of executing sv_restart 1 through a server command to change sv_restart via CVAR pointer. Changed client_cmd for spec n choose execution to engclient_cmd. These basic changes were done by recommendation of VEN to increase speed and proficiency of coding (thanx to VEN for these tips).
- Added the "Switch All Kill" option (mainly for the "Switch All" admin commands). Added the option to base automatic round restarts off of a set time limit (in minutes) and not rounds if needed. Added the "Time Wait Round" option to wait until the next round when the time limit has been reached before performing an auto round restart (to avoid auto round restarts mid-round). Added the chat commands roundsleft and timeleftrr to display how many rounds or how much time (in minutes) is left until an automatic round restart will occur. Added the option to display a "final round" message when the final round has been reached before an auto round restart. Added stock functions and more checks in case CVARS are changed mid-game for scrims. Got rid of the check CVAR autorr_islo3active and added the log event Restart_Round_(3_seconds) to replace the check CVAR and check for lo3 activities in a secure, better manner.
- Added "Spec n' Choose" options. Added a check at the beginning of each round to make sure there is at least 1 player on each team.