Pk tourna auto invite by message

01/18/2010 05:53 gulpi_de_gulat#1
i was coded a server maintenance message to all players by typing the console /sm and the code is done right, but for the pk tournament im lost pls help me w/ this
Code:
 }
              public static void PKTournamentTimer_E(object sender, ElapsedEventArgs e)
                {
                    
             if ((DateTime.Now.DayOfWeek == DayOfWeek.Monday || DateTime.Now.DayOfWeek == DayOfWeek.Wednesday) && DateTime.Now.Hour == 10 && DateTime.Now.Minute == 20)
             {
                new Thread(new ThreadStart(
                        delegate()
                        {
                  
                    Game.World.SendMsgToAll("SYSTEM", "Pk Tounament will start in 10 minutes! Hurry and sign up now!", 2005, 0);
                    
                    Thread.Sleep(5 * 60 * 1000);
                    Game.World.SendMsgToAll("SYSTEM", "Pk Tournament will start in 5 minutes! Hurry and sign up now!", 2005, 0);
                    Thread.Sleep(1 * 60 * 1000);
                    Game.World.SendMsgToAll("SYSTEM", "Pk Tounament will start in 4 minutes! Hurry and sign up now!", 2005, 0);
                    Thread.Sleep(1 * 60 * 1000);
                    Game.World.SendMsgToAll("SYSTEM", "Pk Tournament will start in 3 minutes! Hurry and sign up now!", 2005, 0);
                    Thread.Sleep(1 * 60 * 1000);
                    Game.World.SendMsgToAll("SYSTEM", "Pk Tournament will start in 2 minutes! Hurry and sign up now!", 2005, 0);
                    Thread.Sleep(1 * 60 * 1000);
                    Game.World.SendMsgToAll("SYSTEM", "Pk tournament will start in 1 minute! Hurry and sign up now!", 2005, 0);
                }
             }
        
         }
i want this to start w/ timers im fail :( its me yhudong
01/18/2010 06:02 Arcо#2
Wouldn't it be DateTime.DayOfWeek.Now == Wedesneday instead of DateTime.Now.DayofWeek?
01/18/2010 06:08 hunterman01#3
Dont forget to actually start the timer
01/18/2010 06:14 gulpi_de_gulat#4
its error i dont think thats the problem, but thankz for helping hepatitis c
01/18/2010 06:19 gulpi_de_gulat#5
Quote:
Originally Posted by hunterman01 View Post
Dont forget to actually start the timer
so what should i do