24.06.2015, 20:33
OnPlayerUpdate gets called very frequently each second depending on what the player is doing. This is a quote from the SA-MP wiki:
This could mean that OnPlayerUpdate gets called about 10-50 times in a second while the player is doing something meaning everything you have under OnPlayerUpdate is processed way more than you would possibly need to.
A solution to this is to move all the code you have under OnPlayerUpdate to a timer. This timer could be a single second timer or even a half second timer. Either way, it would be much better for your server's performance to use a timer instead of OnPlayerUpdate.
Quote:
This callback is called everytime a client/player updates the server with their status. |
A solution to this is to move all the code you have under OnPlayerUpdate to a timer. This timer could be a single second timer or even a half second timer. Either way, it would be much better for your server's performance to use a timer instead of OnPlayerUpdate.