[Request]a small request.

09/30/2008 16:14 BlooD-BoY#1
ok so i was kinda playing around with the CO pserver files in C# and i tried to make a GM msg to show every like minute or so...i tried to make a timer for it with the command "World.SendMsgToAll("bla bla bla msg", "GM", 2011);"
but it didnt work, any one has any ideas on how to make a GM msg to show every 1-5mins just like in CO "Dont trust any one who doesnt have a [GM]/[PH] in their names....bla bla bla"? thx
09/30/2008 16:17 Zanzibar#2
Make a timer in general.cs and er yea?
09/30/2008 16:36 BlooD-BoY#3
Quote:
Originally Posted by Zanzibar View Post
Make a timer in general.cs and er yea?
thats wat i did, where the restart timer and umm savechar timer O.O
09/30/2008 22:55 LetterX#4
Well, not that hard... I added one to my server :D
09/30/2008 23:05 BlooD-BoY#5
Quote:
Originally Posted by LetterX View Post
Well, not that hard... I added one to my server :D
ok..so could u give me a hint on how to make it? cuz i made a timer, and it should say that but it doesnt O.O
10/01/2008 02:36 tao4229#6
Quote:
Originally Posted by LetterX View Post
Well, not that hard... I added one to my server :D
That f*ken annoying thing >_>
10/01/2008 02:54 LetterX#7
Ehh, here is the code for LOTF:

In General.cs (Underneath "thetimer") put:
Code:
                BroadCastTimer = new System.Timers.Timer();
                BroadCastTimer.Interval = 1000000;
                BroadCastTimer.Elapsed += new ElapsedEventHandler(BroadCastTimer_Elapsed);
                BroadCastTimer.Start();
Then, find the second "thetimer" section, and underneath put:
Code:
        public static void BroadCastTimer_Elapsed(object sender, ElapsedEventArgs e)
        {
            World.SendMsgToAll("Put Message Here", "SYSTEM", 2011);
        }
Edit: This timer shows up every 10 minutes. :D
10/01/2008 13:47 BlooD-BoY#8
Quote:
Originally Posted by LetterX View Post
Ehh, here is the code for LOTF:

In General.cs (Underneath "thetimer") put:
Code:
                BroadCastTimer = new System.Timers.Timer();
                BroadCastTimer.Interval = 1000000;
                BroadCastTimer.Elapsed += new ElapsedEventHandler(BroadCastTimer_Elapsed);
                BroadCastTimer.Start();
Then, find the second "thetimer" section, and underneath put:
Code:
        public static void BroadCastTimer_Elapsed(object sender, ElapsedEventArgs e)
        {
            World.SendMsgToAll("Put Message Here", "SYSTEM", 2011);
        }
Edit: This timer shows up every 10 minutes. :D
lolz my only mistake was here : "(BroadCastTimer_Elapsed);"
thx for the guide, dude :P
10/01/2008 13:49 Zanzibar#9
In the beginning with all the timers add
Code:
public static System.Timers.Timer BroadCastTimer;
10/01/2008 14:11 BlooD-BoY#10
Quote:
Originally Posted by Zanzibar View Post
In the beginning with all the timers add
Code:
public static System.Timers.Timer BroadCastTimer;
yeah i was about to post that you had to def. the var. O.O but nvm ok you can delete this thread, i got the help i needed thx. =)