Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed
#17

Quote:
Originally Posted by Jefff
Посмотреть сообщение
Should be function bool:IsPlayerPaused(playerid) because checking with timer and OPU is slow
You don't need to use a timer, you can use GetTickCount to store the last update time of the player in OnPlayerUpdate, and to check if they're paused or timing out, check if (GetTickCount() - last update time) is more than 1 or 2 seconds. That is probably how any such native function would work anyway, because once the client pauses it stops sending updates, so it couldn't notify the server any other way.

If this is an intended feature then it's fantastic, 10/10 - pausing to avoid death was always very annoying to deal with.
Reply


Messages In This Thread
Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by ..Bobby.. - 18.01.2014, 13:48
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by Riddick94 - 18.01.2014, 13:53
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by FlawPaw - 18.01.2014, 13:55
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by ..Bobby.. - 18.01.2014, 13:58
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by sampreader - 18.01.2014, 14:02
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by Pottus - 18.01.2014, 14:02
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by Lordzy - 18.01.2014, 14:02
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by MP2 - 18.01.2014, 14:04
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by Mauzen - 18.01.2014, 14:15
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by Jefff - 18.01.2014, 14:41
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by Swisher - 18.01.2014, 14:54
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by PawnoQ - 18.01.2014, 15:06
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by newbienoob - 18.01.2014, 15:08
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by Cypress - 18.01.2014, 15:54
Re : Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by HitnKill - 18.01.2014, 16:03
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by StreetGT - 18.01.2014, 17:34
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by ev0lution - 18.01.2014, 18:01
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by Edvin - 18.01.2014, 22:45
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by ..Bobby.. - 22.01.2014, 15:17
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by Zhao - 22.01.2014, 22:14
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by CuervO - 22.01.2014, 22:46
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by cyber_punk - 22.01.2014, 23:12
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by Pottus - 22.01.2014, 23:56
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by eider - 23.01.2014, 04:41
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by Riddick94 - 23.01.2014, 06:56
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by Cypress - 23.01.2014, 15:47
Respuesta: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by MugiwaraNoLuffy - 23.01.2014, 22:34
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by eider - 23.01.2014, 22:54
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by ev0lution - 24.01.2014, 00:21
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by Emmet_ - 24.01.2014, 04:08
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by eider - 24.01.2014, 04:18
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by cyber_punk - 24.01.2014, 04:41
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by Zhao - 27.01.2014, 05:04
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by cyber_punk - 27.01.2014, 06:14
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by eider - 27.01.2014, 06:49
Respuesta: Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by MugiwaraNoLuffy - 27.01.2014, 07:06
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by eider - 27.01.2014, 10:24
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by cyber_punk - 27.01.2014, 13:33
Re: Video: SA-MP 0.3z Bug 1: Players in AFK mode can be killed - by Diablosrouge - 29.01.2014, 21:32

Forum Jump:


Users browsing this thread: 6 Guest(s)