Check Player Pause
#1

Do someone can tell me how to check whether the player is in the ESC menu (pause).
Reply
#2

There is no function that tells you if a player is paused or not. The best way to do so is to check if a player has no moved in 3-5 minutes and then determine if he/she is afk.
Reply
#3

I know that, but I need to check when the player robing could not keep the ESC menu... This is what I want so I can not do this way ...
Reply
#4

Quote:
Originally Posted by Petricko
Посмотреть сообщение
I know that, but I need to check when the player robing could not keep the ESC menu... This is what I want so I can not do this way ...
As far as I know, when the player pauses, OnPlayerUpdate stops working so you can do like IsPause[ playerid ] = 0; at OnPlayerUpdate and in a timer IsPause[ playerid ]++; which counts the seconds of the player being paused. So you can use a "if/else" statement to know if the player is paused;

pawn Код:
if( IsPause[ playerid ] > 5 ) // if player is afk from 5 second or w/e
{
// your code
}
Edit: There are some includes or useful snippets in the forum regarding this, you may find it by search button.

Regards FalconX
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)