OnPlayerUpdate or a timer?
#1

Hi I have started to make an anticheat.Would using OnPlayerUpdate lag the server too much or should i put it in a 1 second timer?
What would be better?
Reply
#2

I wouldn't be calling it almost all the time as the more players you have the laggier it will get. Just try some testing of your own to find the best interval timing.
Reply
#3

Napravi jedan globalan timer, od jednog timera nece lagati server.

Make one global timer, server won't lag of one timer..
Reply
#4

OnPlayerUpdate Lagging server for many players, Timer Won't lag Because it is defined for each player
Reply
#5

Quote:
Originally Posted by .FuneraL.
Посмотреть сообщение
OnPlayerUpdate Lagging server for many players, Timer Won't lag Because it is defined for each player
Complete nonsense,

Onplayerupdate is told to lag because it is basically a very fast timer,

Its basically something like this:
pawn Код:
SetTimerEx("OnPlayerUpdate", 62, true, "i", playerid);
And it will only lag if big operations are done at the OnPlayerUpdate, like file writing/loading, checking hundreds of variables, etc..


A timer would be a better choice, because you do not need to check for hacks 16 times a second,
A time of 2500 would be fine for an anti cheat, while OnPlayerUpdate uses around 62-63...
Reply
#6

I believe that with a timer, it would be better and easier , not represent so much load.
Reply
#7

Quote:
Originally Posted by milanosie
Посмотреть сообщение
Complete nonsense,

Onplayerupdate is told to lag because it is basically a very fast timer,

Its basically something like this:
pawn Код:
SetTimerEx("OnPlayerUpdate", 62, true, "i", playerid);
And it will only lag if big operations are done at the OnPlayerUpdate, like file writing/loading, checking hundreds of variables, etc..


A timer would be a better choice, because you do not need to check for hacks 16 times a second,
A time of 2500 would be fine for an anti cheat, while OnPlayerUpdate uses around 62-63...
Not really, OnPlayerUpdate is always different. It's not always the same.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)