Raised This Month: $ Target: $400
 0% 

Add a coundown like 10, 9, 8, 7, 6....0 for a restart plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
RCC|Dynamite
Senior Member
Join Date: May 2004
Location: Germany
Old 06-08-2006 , 07:36  
Reply With Quote #8

I think that is the last question^^

Code:
#include <amxmodx> #define RESTART_TIME 3600 new g_countdown = RESTART_TIME; public plugin_init() {     register_plugin("Auto-Restart" , "1.1" , "v3x")     set_task(1.0 , "countdown" , 918231 , _ , _ , "b") }   public countdown() {     g_countdown--;     switch(g_countdown)     {         case 2700: client_print(0 , print_chat , "* Round restarting in 45 minutes");client_cmd(0 , "spk ^"fvox/fortyfive^"");         case 1800: client_print(0 , print_chat , "* Round restarting in 30 minutes");client_cmd(0 , "spk ^"fvox/thirty^"");         case 900: client_print(0 , print_chat , "* Round restarting in 15 minutes");client_cmd(0 , "spk ^"fvox/fifteen^"");         case 300: client_print(0 , print_chat , "* Round restarting in 5 minutes");client_cmd(0 , "spk ^"fvox/five^"");         case 2 .. 10: client_print(0 , print_center , "Round restarting in %d seconds" , g_countdown);         case 1:         {           set_cvar_num("sv_restartround" , 1);           g_countdown = RESTART_TIME;         }     } }

Is it so right?
__________________

|###########|
|###########|
|###########|
RCC|Dynamite is offline
Send a message via ICQ to RCC|Dynamite
 



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


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