31.01.2015, 10:22
I would always recommend to use timers instead of having code in your OnPlayerUpdate.
But the lag depends on how much code you're trying to process, and how often, in OnPlayerUpdate, it will process all the code each time the player sends an update packet. Etc. 30 ms or something like that, maybe even more if they have a high framerate.
The same goes for timers, processing too much code each second might also lag.
It could also depend on your machine specs, how much it can handle.
But the lag depends on how much code you're trying to process, and how often, in OnPlayerUpdate, it will process all the code each time the player sends an update packet. Etc. 30 ms or something like that, maybe even more if they have a high framerate.
The same goes for timers, processing too much code each second might also lag.
It could also depend on your machine specs, how much it can handle.