[Solved] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Solved] (
/showthread.php?tid=77921)
[Solved] -
Danny_Costelo - 16.05.2009
Solved, Thanks
Re: AFK detector -
dice7 - 16.05.2009
Use the callback OnPlayerUpdate(playerid). It returns 1 everytime a player does something
Re: AFK detector -
MenaceX^ - 16.05.2009
People usualy make a complicated AFK system, I make it around 4 lines I guess, just set a timer and go to OnPlayerUpdate.
Re: AFK detector -
Rks25 - 16.05.2009
Menace i am curious about your system, mind sharing it. I would like to see what you would make in 4 lines...
Re: AFK detector -
MenaceX^ - 16.05.2009
I'm sure you could do it yourself.
Re: AFK detector -
Weirdosport - 16.05.2009
A timer that every 30 seconds checks a value to see if it == 1, and sets it back to 0 again. In OnPlayerUpdate make it set a variable to 1.
If the timer gets round to a player and realises their number is still 0, they're AFK.
The timer will need a loop in it...
Re: AFK detector -
MenaceX^ - 16.05.2009
Quote:
Originally Posted by Weirdosport
A timer that every 30 seconds checks a value to see if it == 1, and sets it back to 0 again. In OnPlayerUpdate make it set a variable to 1.
If the timer gets round to a player and realises their number is still 0, they're AFK.
The timer will need a loop in it...
|
No, mine does not work in that way.
Re: AFK detector -
Rks25 - 16.05.2009
And that all in 4 lines?
Quote:
Originally Posted by Weirdosport
A timer that every 30 seconds checks a value to see if it == 1, and sets it back to 0 again. In OnPlayerUpdate make it set a variable to 1.
If the timer gets round to a player and realises their number is still 0, they're AFK.
The timer will need a loop in it...
|
timer => 1 line
On‌PlayerUpdate => 1 line
Loop to check if 0 or 1 => 3 lines minimum (loop define, connect check, variable check)
Not 4 lines
Re: AFK detector -
MenaceX^ - 16.05.2009
God... Look again, it wasn't my reply. And I already said, I don't do it in Weirdosport's way.
Re: AFK detector -
Ignas1337 - 16.05.2009
it is possible to make it in minimum lines i guess, but it'd be hard to figure where's what