Raised This Month: $12 Target: $400
 3% 

Auto Game Restart with Countdown Timer


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Event Related       
AbeX
Junior Member
Join Date: Mar 2007
Old 02-18-2009 , 19:02   Auto Game Restart with Countdown Timer
Reply With Quote #1

Auto Game Restart with Countdown Timer
Version 1.0
Created by AbeX
19.02.2008

Features:
Plugin restarts the game after the time in seconds you have choose.
Also it shows HUD message with countdown timer in the center of screen.
After restart the message "LIVE ! LIVE ! LIVE !" will appear in chat.
Counting starts at game commencing.

Installation:

Put compiled plugin in the /plugins/ directory.
Add line containing "auto_rr.amxx" into your plugins.ini file.

Requirements:
None (amxmodx)

Configuration:
Use autorr_time (float) CVAR in your amxx.cfg change the time after
that game will be restarted. Example:

PHP Code:
autorr_time 10.0 //game will be restarted in 10 seconds, default: 20.0 
TODO:
  • Sound playing every second (+ ability to change / disable)
  • Countdown with voice (+ ability to modify / disable)
  • CVAR to modify / disable countdown HUD message
  • CVAR to modify / disable "LIVE ! LIVE ! LIVE !" chat message
  • CVAR to choose between 1 and 3 restarts
Attached Files
File Type: sma Get Plugin or Get Source (auto_rr.sma - 1767 views - 1.7 KB)

Last edited by AbeX; 02-19-2009 at 05:34. Reason: Modification & Category change.
AbeX is offline
Kont
Member
Join Date: Jan 2009
Old 02-19-2009 , 03:36   Re: Auto Game Restart with Countdown Timer
Reply With Quote #2

It is not working perfect. In the start of map, OK, it countdowns and restarts round. But the problem is: Assume that there is 2 players. They started play. When one is disconnected and another player is connected then it should be GAME COMMENCING again. Then it's countdowns and not restarts. But countdowns like -50 -51 -52 and so on and round will never restart. g_seconds should be equal to countdown second or something like this. ithink

Last edited by Kont; 02-19-2009 at 03:39.
Kont is offline
Kont
Member
Join Date: Jan 2009
Old 02-19-2009 , 04:12   Re: Auto Game Restart with Countdown Timer
Reply With Quote #3

I found the problem and fixed by myself. But it's not quite good way. I've inserted "if (g_Seconds < 20 || g_Seconds > 20) g_Seconds = 20" before set_task in the game_commencing section. Then it worked fine. Of course auto restart time always be 20 sec. I have to change manually if I had to change the value. But you should fix this in your good way. Mine is not clean and goodlooking one. Thanks I'm using this on my server.
Kont is offline
AbeX
Junior Member
Join Date: Mar 2007
Old 02-19-2009 , 05:33   Re: Auto Game Restart with Countdown Timer
Reply With Quote #4

I rewrote the plugin, now there is checking for started task and g_Seconds will be restored to CVAR every Game_Commencing.

Test it out. First post attached plugin updated too. Thanks for testing, Kont.
Attached Files
File Type: sma Get Plugin or Get Source (auto_rr.sma - 1234 views - 1.7 KB)
AbeX is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 02-22-2009 , 23:55   Re: Auto Game Restart with Countdown Timer
Reply With Quote #5

This plugin needs testing. If anyone can report that it does or doesn't work, please post.

If you would like any information regarding possible adjustments you could make or things you could do to make this better, please feel free to post here or PM me.

Approval pending on changes.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 02-23-2009 , 08:23   Re: Auto Game Restart with Countdown Timer
Reply With Quote #6

Any diference with this: http://forums.alliedmods.net/showthread.php?p=666779 ?
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
AbeX
Junior Member
Join Date: Mar 2007
Old 02-23-2009 , 10:28   Re: Auto Game Restart with Countdown Timer
Reply With Quote #7

Quote:
Originally Posted by AntiBots View Post
Didn't found this plugin earlier. Okey, unapproved.
AbeX is offline
12345
Senior Member
Join Date: Dec 2004
Old 02-24-2009 , 14:57   Re: Auto Game Restart with Countdown Timer
Reply With Quote #8

Plugin works fine! Running it on my server!
12345 is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 02-24-2009 , 15:14   Re: Auto Game Restart with Countdown Timer
Reply With Quote #9

Quote:
Originally Posted by AbeX View Post
Didn't found this plugin earlier. Okey, unapproved.
Done.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Reply


Thread Tools
Display Modes

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 22:06.


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