Posts: 1,840
Threads: 399
Joined: Oct 2010
Reputation:
0
Heey all,
I am making a cnr server so using much timers.
Is there a Timer Streamer or something for decreasing the lags?
Thanks Admigo
Posts: 2,502
Threads: 26
Joined: Apr 2007
Reputation:
0
I doubt you need that many timers, I bet you could cut down on most of them as you are probably making far too many of them when you may not even need them.
One example of a common mistake I see around here: Are you using timers to limit how often a certain command can be used? If so, you are doing it a very inefficient way.
Can you show us an example of the timers you use that you think may need to be optimized?
Posts: 1,840
Threads: 399
Joined: Oct 2010
Reputation:
0
I think i am only use 6 timers but sometimes my server lags that if i am typing something the message show about 5 seconds later and sometime my game clock is stuck then about some seconds it starting again so lag by timers i think.
Posts: 3,351
Threads: 780
Joined: Jan 2010
Try to categorize timers,don't use it too much or it will cause lag.Regroup the timers.Example:
If you have to check players hp/armour and money,dont do 3 timers,just use one for all the 3 checks.
Posts: 1,840
Threads: 399
Joined: Oct 2010
Reputation:
0
What About Y_Timers? Whats does that include?
Posts: 1,177
Threads: 27
Joined: Sep 2011
Reputation:
0
That only changes the way you make timers, doesn't improve speed. If your timers are really fast, you shouldn't have a lot of code in them. Especially in OnPlayerUpdate, you need to keep the code in there to a minimal amount because it's called over 10 times a second.