The most People using 2 Timers or more, i show you an way how to use only 1.
Create in Character.cs for Player the "public DateTime TestCheck;"
Code:
public static System.Timers.Timer MainTimer;
Code:
MainTimer = new System.Timers.Timer();
MainTimer.Interval = 100;
MainTimer.Elapsed += new ElapsedEventHandler(MainTimer_System);
MainTimer.Start();
Code:
public static void MainTimer_System(object sender, ElapsedEventArgs e)
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Char = (Character)DE.Value;
if (Char != null && DateTime.Now > Char.TestCheck.AddMilliseconds(1000)) // Checks if the Current Date + Clocktime like "TestCheck" + 1000 Miliseconds (like 1 Sec). then continue.
{
Char.TestCheck = DateTime.Now; // This sets the "TestCheck" to the current Date + Clocktime...
and the step is going to repeat :)
}
}
}
Dont say something like this suckz or other things.
IF YOU DONT LIKE IT DONT REPLY TO MY POST , VERY EASY OR NOT!






