Posts: 2,268
Threads: 89
Joined: Apr 2009
Reputation:
0
Hello, I've got a question.
When there are 5-10 people I don't lag, but when I got 25-30, sometimes I see others lagging and my chat also lags.
I asked people in the server do they lag, and 80% said that they do.
It wasn't lagging when I was on 0.3b
What could cause this lag?
Any help will be appreciated, thanks in advance.
Posts: 5
Threads: 1
Joined: Jan 2011
Reputation:
0
in 0.3c there are many thing's update which takes up your ping. I also got that same problem. But after replacing everything in streamer, it's fixed
Posts: 2,421
Threads: 52
Joined: Mar 2009
Reputation:
0
Sorry if i'm asking the obvious but, Do you have alot of stuff in "OnPlayerUpdate" or many repeating timers with alot of stuff in them (eg, vehicleloops, rangechecks ect) ?
Posts: 2,268
Threads: 89
Joined: Apr 2009
Reputation:
0
No, I have 5-10 lines in OnPlayerUpdate.
I've got one timer which respawns all vehicles every minute. I also have another timer which saves the players's stats every 3 seconds.
Maybe that's the problem?
Posts: 2,421
Threads: 52
Joined: Mar 2009
Reputation:
0
The timer that saves the stats every 3 seconds is the culprit i'd say (if you mean saving to a file/database). Why not once every couple of mins? worst that could happen if server crashes is a couple of minutes of data is lost.