OnPlayerPauseGame
#1

Hello everyone.So SAMP clearly detects if someone is paused because when he does a small icon will appear above his head.Is there any way to use that to detect if a player is AFK?Cause abviously it's easier,more accurate and we don't have to use useless timers.And if not why don't SAMP team add a callback or a function to detect the paused players.
Reply
#2

Eh..?
Reply
#3

Quote:
Originally Posted by Luis-
Посмотреть сообщение
Eh..?
He means that when a player is paused, it detects that and appears a hourglass above the player's head. Since it detects that already why not to have a callback by SA-MP team instead of using OPU and a timer to detect it via the script.
Reply
#4

Actually, it is the client that detects this, not the server. The client detects that you're not receiving updates from a player and will a render an hourglass above that user's head. And as we all know, clients can't be trusted when it comes to triggering events.
Reply
#5

The hour glass is client sided yes so you need to use OPU
Reply
#6

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
The hour glass is client sided yes so you need to use OPU
This, it also shows up when you're experiencing desync/lag spikes.
Reply
#7

Oh,so when a player pauses the game it will stop sending updates?and if so would it be paussible to detect that under OnPlayerUpdate?
Reply
#8

Quote:
Originally Posted by mirou123
Посмотреть сообщение
Oh,so when a player pauses the game it will stop sending updates?and if so would it be paussible to detect that under OnPlayerUpdate?
Search on the forums for OnPlayerPause or something like that. 500 scripts for that already.
Reply
#9

Okay thanks
Reply
#10

Quote:
Originally Posted by Vince
Посмотреть сообщение
Actually, it is the client that detects this, not the server. The client detects that you're not receiving updates from a player and will a render an hourglass above that user's head. And as we all know, clients can't be trusted when it comes to triggering events.
Actually IIRC I was told that this works the same way as most other scripts on these forums do: it simply monitors the time in which the client sent the last update to the server and if the last update was received in what the server would consider to be a long time, then it flags the client as being inactive.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)