Check For Player Status
#1

I want to know if there is any way to know if the player is paused or writing?
Reply
#2

OnPlayerUpdate isn't called when someone is paused. I don't think so for typing.
Reply
#3

Paused -> https://sampforum.blast.hk/showthread.php?tid=186129

Writing -> You can't detect..
Reply
#4

What about an idle player? Like if they bring up the player menu, or just stay in-game for some time, but don't do anything...?
Reply
#5

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
What about an idle player? Like if they bring up the player menu, or just stay in-game for some time, but don't do anything...?
Umm, for the whole 'or just stay in-game for some time but don't do anything'...

You could try to make a timer, and in that timer, get the X Y and Z coords of the player, save them, and check them after the timer resets, and if they are the same, then do something that tells you that the player is 'afk.'

Not sure if it may work, but hey, ideas are work a try, right?
Reply
#6

Quote:
Originally Posted by Hiitch
Посмотреть сообщение
Umm, for the whole 'or just stay in-game for some time but don't do anything'...

You could try to make a timer, and in that timer, get the X Y and Z coords of the player, save them, and check them after the timer resets, and if they are the same, then do something that tells you that the player is 'afk.'

Not sure if it may work, but hey, ideas are work a try, right?
Perhaps, but having a lot of timers isn't really ideal. Although maybe using "y_timers" (by ******) would help...
Reply
#7

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
Perhaps, but having a lot of timers isn't really ideal. Although maybe using "y_timers" (by ******) would help...
Indeed, but if there were a more efficient way to do it (y_timers), and I knew how to do it, I would definitely give the code out.
Reply
#8

Quote:
Originally Posted by Hiitch
Посмотреть сообщение
Indeed, but if there were a more efficient way to do it (y_timers), and I knew how to do it, I would definitely give the code out.
I guess I'll have to give it a shot sometime in the future then...

P.S. Nice quote!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)