I've been using the following code for specific events to activate things at different times for everyone who is in the event which works fine.
But now im looking at using for something different and im wondering if there is a way to make it so that for every new player that goes through this it starts a new "TimerB" for each individual player rather than just altering it for every player thats gone through it?
But now im looking at using for something different and im wondering if there is a way to make it so that for every new player that goes through this it starts a new "TimerB" for each individual player rather than just altering it for every player thats gone through it?
Code:
public static System.Timers.Timer TimerB;
public static void Start(Client.GameState client)
{
TimerB = new System.Timers.Timer(1000.0);
TimerB.Start();
TimerB.Elapsed += delegate { Create(client); };
Code:
public static void Create(Client.GameState client)
{
if (Now > CreateStamp.AddMinutes(5))
{
TimerB.Stop();
Trigger1(client);
}
}