Register for your free account! | Forgot your password?

You last visited: Today at 02:52

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Timers Question

Discussion on Timers Question within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2006
Posts: 41
Received Thanks: 2
Timers Question

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?

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);
               }
           }
hacksaw is offline  
Old 05/07/2013, 21:49   #2
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
Why not just make a thread that handles this and loops through your collection of players?

That way you have a single thread and wouldn't have to worry too much about multiple threads, cross-threading etc. assuming your client-collection is thread-safe.
Super Aids is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Better way to set Autoinvite timers?
03/09/2013 - CO2 Private Server - 9 Replies
Hello, I'm using a 5672 edited trinity base. There are a lot of auto-invites timers for several events, but it's situated in Threading system, program.cs this is kinda taking a lot of RAMs (+150mb on 0 players), even with a powerful host, ping is 200-500, it use to be less than 100 on other sources. Do you suggest a better way to deal with these timers? to be honest, i've no idea what to do
Old Timers
10/03/2012 - Shaiya Private Server - 10 Replies
Hey there Epvp been awhile sense i been around just looking around here. To see if i can find any old guildys or players from either Shaiya Evo or Shaiya Abso. My char name i used on those 2 was Syn or other variations of Syn for alt toons. On Evo i was guild leader of Requiem and on Abso i was guild leader of Damnation. So if any of u reconize the name or guilds from those servers hit me up looking to try and connect with some of u guys and gals from the past.
Recast Timers
01/30/2011 - General Gaming Discussion - 0 Replies
Are recast timers client side? I messed around and could only find a single layer pointer, I know there's more layers than that, but I'm having a little trouble.
[Question/Request]Halo Timers
01/19/2010 - CO2 Private Server - 5 Replies
has anyone made the save halo timer and if so could they be kindly and release it. ty
Mission Timers?
11/10/2008 - Ace Online / AirRivals - 15 Replies
Ive seen it said a few times that you can slow down the mission timer for missions such as the Lv.8 Mission, and the ANI Lv.27 Mission. Others claim such things are impossible :P What im really looking to know is... Is it Possible?, and How long can you remain in the mission map? Im trying to use Cheat Engine 5.3 but i dont really got the hang of it yet. and a little explination on how this works would be really helpful. Please, and Thank You? :)



All times are GMT +1. The time now is 02:53.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.