AutoStart Tournament

12/26/2009 00:27 N¡ghtMare ?? WooT#1
How do i make so a tournament start automatical, is for LOTF (C#)
Sorry for asking, but i dunno remember >.<
12/26/2009 00:32 Arcо#2
Quote:
Originally Posted by N¡ghtMare ?? WooT View Post
How do i make so a tournament start automatical, is for LOTF (C#)
Sorry for asking, but i dunno remember >.<

You need to make a method for it and you can use datetime.
12/26/2009 00:43 N¡ghtMare ?? WooT#3
Ya but how.
Is it in world.cs?
I mean like: (I know is not like this is just example)
Quote:
if Time = XX:30
{
DeathMatch = true;
}
if Time = XX:40
{
DeathMatch = false;
But thanks :D
But i need some more help to add the things XD
12/28/2009 11:27 Arcо#4
Quote:
Originally Posted by N¡ghtMare ?? WooT View Post
Ya but how.
Is it in world.cs?
I mean like: (I know is not like this is just example)

But thanks :D
But i need some more help to add the things XD
That could work, or you could do something like
Case Monday:
if (Hours(5) == 15:30)
Method<I use global timer so its like this>
Do you get it?
01/03/2010 05:23 N¡ghtMare ?? WooT#5
I get it some way.
Thanks.
I hope i can make it work :D
01/03/2010 09:56 Arcо#6
Quote:
Originally Posted by N¡ghtMare ?? WooT View Post
I get it some way.
Thanks.
I hope i can make it work :D

No problem.
Anymore questions feel free to pm me and I will gladly help you out.
01/03/2010 11:12 Nullable#7
Code:
System.Timers.Timer cTimer = new System.Timers.Timer(1000.0);
cTimer.Start();
cTimer.Elapsed += delegate{  StartTournament();  };
void StartTournament()
{
      if(DateTime.Now == <YourValue>)
      {
           // Do whatever for tournament here
      }
}
01/03/2010 11:53 ~Yuki~#8
i would not use a 1 Second timer as it will lag up everithing.

i would make it atleast 30 -120 minutes
01/03/2010 14:16 Nullable#9
Quote:
Originally Posted by ~Yuki~ View Post
i would not use a 1 Second timer as it will lag up everithing.

i would make it atleast 30 -120 minutes
In this case a 1 min timer is max, you don't want to miss starting the tournament just because you used some large time spans, give it a small calculation at different values and consider that you might actually start up your server 10 minutes before your tournament is supposed to fire up, see if a 30 min timer will work with that. . and it will not lag anything up just because of a simple boolean operation :p
01/05/2010 09:24 N¡ghtMare ?? WooT#10
@Nullable
I hav a question, the place you say i should put value, is it what time??
So if i put 45.
It come every XX:45?
01/05/2010 14:11 Nullable#11
Quote:
Originally Posted by N¡ghtMare ?? WooT View Post
@Nullable
I hav a question, the place you say i should put value, is it what time??
So if i put 45.
It come every XX:45?
If(DateTime.Now.Minute == 45) to make it start every time it is XX:45
01/05/2010 19:33 .Kob#12
Where we put this?
01/05/2010 19:45 Arcо#13
Quote:
Originally Posted by cakobu View Post
Where we put this?

You can put it with the method.
01/08/2010 12:07 N¡ghtMare ?? WooT#14
Code:
System.Timers.Timer cTimer = new System.Timers.Timer(1000.0);
cTimer.Start();
cTimer.Elapsed += delegate{  StartTournament();  };
void StartTournament()
{
      if(DateTime.Now == <YourValue>)
      {
           // Do whatever for tournament here
      }
}
When i paste it in world.cs it says:
Methode must have a return point.
How to i do?
Thanks.
01/08/2010 13:52 Nullable#15
Quote:
Originally Posted by N¡ghtMare ?? WooT View Post
When i paste it in world.cs it says:
Methode must have a return point.
How to i do?
Thanks.
There are no methods in this code, maybe it is your method that is not a void, check your code, if it is not mind posting the code?