Raised This Month: $32 Target: $400
 8% 

Auto Round Restart [autorr] - v1.6 - 2007-10-13


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Server Management        Approver:   Xanimos (85)
SubStream
Veteran Member
Join Date: Aug 2005
Location: USA
Old 06-29-2006 , 20:05   Auto Round Restart [autorr] - v1.6 - 2007-10-13
Reply With Quote #1

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.

    Benefits:
    • 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.

    Benefits:
    • 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.

    Benefits:
    • 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 and here.

Switch Team Options
Switch Team Options include the following:
Code:
Admin Commands:

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

Plugin CVARS

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
Code:
#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:
Code:
Client Commands:

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
Code:
#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.

Installation
File Locations:
  • .\configs\lo3.cfg (only needed if you have autorr_lo3cfgfile set to 1)
  • .\data\lang\autorr.txt
  • .\plugins\autorr.amxx

Modules Required
  • cstrike

    Note: The cstrike module is NOT required if Switch Team Options have been disabled!!! Switch Team Options are ENABLED by default.
  • nVault

    Note: The nVault module is NOT required if the Hud Toggle Option has been disabled!!! The Hud Toggle Option is ENABLED by default.
Admin Commands

amx_restart - Restarts the game at round 1
amx_lo3 - Executes "Live On Three"
say /restart - Restarts the game at round 1 (just type /restart in chat)
say /lo3 - 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.

amx_switchall - Switches all players to the opposite team
amx_specnchoose - Sends everyone to spectate and brings up the choose team menu
say /switchall - Switches all players to the opposite team (just type /switchall in chat)
say /specnchoose - Sends everyone to spectate and brings up the choose team menu (just type /specnchoose in chat)

Client Commands

say roundsleft - Displays how many rounds are left after the current round before an automatic round restart will occur (just type roundsleft in chat)
say timeleftrr - 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.

say /hudoff - Removes the AutoRR Hud Message (just type /hudoff in chat)
say /hudon - Displays the AutoRR Hud Message (just type /hudon in chat)


Plugin CVARS

Default for all CVARS is 0

autorr_enable <0|1>
Automatic Round Restarting
  • 0: Automatic Round Restarting is disabled
  • 1: Automatic Round Restarting is enabled


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>
Auto Restart Rounds
  • This is the number of rounds that can be played before an automatic round restart will occur

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)
Auto Restart Time (in minutes)
  • This is the number of minutes that can be played before an automatic round restart will occur

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.
autorr_timewaitround <0|1>
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.

autorr_lo3 <0|1>
Auto "Live On Three"
  • 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

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.
autorr_lo3cfgfile <0|1>
Use lo3.cfg File
  • 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

Note: If autorr_time is set to 1, autorr_timewaitround must be set to 1 to use this CVAR.
autorr_saylastround <0|1>
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)

autorr_hudmessage <0|1>
Hud Message
  • 0: No Hud Message will be displayed
  • 1: A constant Hud Message will be displayed showing minutes/rounds left

The following Plugin CVARS will be disabled if Switch Team Options are disabled. Switch Team Options are ENABLED by default.

autorr_autoswitchall <0|1>
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

autorr_switchallkill <0|1>
Switch All Kill
  • 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)

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).
autorr_specnchoose <0|1>
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)

Credits/Thanks
Translations:
  • 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

mp_timelimit Functionality

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.

Plugin History

[2007-10-13] v1.6
  • 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.
[2007-04-04] v1.5
  • Added Hud CVAR, Hud Toggle Option/Commands, lo3 custom .cfg CVAR, polished up a few lines of code
[2006-07-13] v1.4
  • 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.
[2006-07-12] v1.3
  • 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).
[2006-07-08] v1.2
  • 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.
[2006-07-05] v1.1
  • 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.
[2006-06-29] v1.0
  • Initial release.
Attached Files
File Type: sma Get Plugin or Get Source (autorr.sma - 16735 views - 21.7 KB)
File Type: zip autorr.zip (22.4 KB, 12078 views)

Last edited by SubStream; 10-13-2007 at 13:37. Reason: Updating to version 1.6
SubStream is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 06-29-2006 , 23:16   Re: Auto Round Restart [autorr] - v1.0 - 2006-06-29
Reply With Quote #2

nice plugin, man. I'll like the coding too, dont care what anyone else's say, your a really good plugin maker
Deviance is offline
Anthony
New Member
Join Date: Jun 2006
Old 06-30-2006 , 21:38   Re: Auto Round Restart [autorr] - v1.0 - 2006-06-29
Reply With Quote #3

I find this plugin useful on my server, saves time I dont have to restart the rounds and can contrate more on my gameplay. This will be one plugin that will stay on my server and I also recommend it to others as well. Good job on the plugin and nice clean coding as well.
Anthony is offline
Andy03
Junior Member
Join Date: Jul 2006
Old 07-02-2006 , 14:32   Re: Auto Round Restart [autorr] - v1.0 - 2006-06-29
Reply With Quote #4

I've been using this on my server for the past couple days on AMX Mod X 1.71 and it has been running smoothely

This has been a huge relief for my server because we stay on assault upc all the time and constantly having to rejoin the server was quite annoying.

My clan loves the lo3 restarts and team switching and I definetly like how everyone gets a chance to play on both teams while they are in the server.

I didn't think I would be using the admin commands for anything but I decided to test it out for a scrim yesterday and it was so easy to switch teams and restart the second half .. it really was less of a pain than waiting for everyone to switch on their own...


Good stuff keep up the good work.
__________________
Andy03 is offline
Jonathan Young
Member
Join Date: Oct 2004
Location: Las Vegas, Nevada
Old 07-02-2006 , 14:39   Re: Auto Round Restart [autorr] - v1.0 - 2006-06-29
Reply With Quote #5

This plugin works great. I like it for gaming leagues and clans mostly. If you forget what round to restart game and switch teams, it does it for you. A great plugin for clan matches and league matches. I recommend it for clans and my very own gaming league's use. Enjoy this plugin.
__________________
Sincerely,
Jonathan Young
Jonathan Young is offline
wigger4life
New Member
Join Date: Jul 2006
Old 07-02-2006 , 16:39   Re: Auto Round Restart [autorr] - v1.0 - 2006-06-29
Reply With Quote #6

this sounds like some cool stuff man.. and I think my 24/7 dust2 server could def use it... and itabout time some 1 made a mod like this... Imma add it right now to the server

I might post back in a week or so about how its been goin with it on
wigger4life is offline
-=STN=- MaGe
Veteran Member
Join Date: Apr 2004
Location: Asault World
Old 07-05-2006 , 10:49   Re: Auto Round Restart [autorr] - v1.0 - 2006-06-29
Reply With Quote #7

something really silly
we have 24/7 assault but after a while with this plugin the back door locks it self.
does it everytime.
__________________



-=STN=- MaGe is offline
Send a message via Yahoo to -=STN=- MaGe
SubStream
Veteran Member
Join Date: Aug 2005
Location: USA
Old 07-05-2006 , 11:16   Re: Auto Round Restart [autorr] - v1.0 - 2006-06-29
Reply With Quote #8

Quote:
Originally Posted by -=STN=- MaGe
the back door locks it self.
I'm not sure exactly what that means but ok?

Last edited by SubStream; 07-05-2006 at 11:18.
SubStream is offline
pulpy
Senior Member
Join Date: Oct 2005
Location: Brights Grove, ON
Old 07-05-2006 , 12:31   Re: Auto Round Restart [autorr] - v1.0 - 2006-06-29
Reply With Quote #9

Hey man looks like a good plugin, i run 3 24/7 map servers, however only 1 request... instead of actually restarting the rounds and switching all players to opposite team, can you add the option to go to send everyone to spectate and bring up the choose team menu?? I think this will help mix up the teams a bit more and be more similar to a map change.. it would really be helpful and awesome if you can add this.. great plugin

oh and i think this will restart the rounds because when everyone is in spectate the rounds will restart when people rejoin teams.. I hope you can do this.. thnx
__________________
pulpy is offline
-=STN=- MaGe
Veteran Member
Join Date: Apr 2004
Location: Asault World
Old 07-05-2006 , 12:52   Re: Auto Round Restart [autorr] - v1.0 - 2006-06-29
Reply With Quote #10

you played cs_assault before?

you ever seen the back door not open/ be locked?

well i have not either, but it happens.
__________________



-=STN=- MaGe is offline
Send a message via Yahoo to -=STN=- MaGe
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 15:14.


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