Quote:
Originally Posted by Jefff
Should be function bool:IsPlayerPaused(playerid) because checking with timer and OPU is slow
|
You don't need to use a timer, you can use GetTickCount to store the last update time of the player in OnPlayerUpdate, and to check if they're paused or timing out, check if (GetTickCount() - last update time) is more than 1 or 2 seconds. That is probably how any such native function would work anyway, because once the client pauses it stops sending updates, so it couldn't notify the server any other way.
If this is an intended feature then it's fantastic, 10/10 - pausing to avoid death was always very annoying to deal with.