Which one is better? [OnPlayerUpdate vs SetTimer]
#8

Quote:
Originally Posted by cessil
Посмотреть сообщение
each is better in its own way, it depends on the situation
^ This. If one was better than the other, why would we have both? If you only want to run something at a set interval, use a timer - using GetTickCount in OnPlayerUpdate is almost exactly what timers do anyway, so you are just duplicating effort. If you want something to happen as often as possible when a player's data changes, use OnPlayerUpdate.

Asking about "performance" and "optimisation" is the wrong thing to ask because I guarantee that any trivial differences between the two will be meaningless compared to the code you are running within the functions.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)