Checking Pause Screen
#2

A good idea is, to set OnPlayerUpdate a variable value to 1.

Now, create a timer every second (1000 ms), and lower the defined value by 1.
Check on that timer if the value is zero (if it's decreased), if so, he paused for one second.

This is because OnPlayerUpdate is not called when the player pauses, therefore the value is not set to 1 anymore and can decrease (timers are still executed).

But for a more efficent way use the OnPlayerPause include.
Reply


Messages In This Thread
Checking Pause Screen - by s1k - 06.03.2011, 03:20
Re: Checking Pause Screen - by admantis - 06.03.2011, 04:08
Re: Checking Pause Screen - by s1k - 06.03.2011, 04:11

Forum Jump:


Users browsing this thread: 1 Guest(s)