04.12.2009, 01:43
I mean once the player types the command, the AFK effect doesn't take place until 30 seconds are up, and if the players moves, gets hit, shoots, types a command, or whatever, then the AFK doesn't take affect. It would only require 1 timer (per player)
pawn Code:
SetTimerEx("OnPlayerAFK",30000,0,"i",playerid);
public OnPlayerAFK(playerid)
{
new Float:x,Float:y,Float:z,Float:hp;
GetPlayerHealth(playerid,hp);
if((pAFKX[playerid]!=x)||(pAFKY[playerid]!=y)||(pAFKZ[playerid]!=z)||(pAFKHP[playerid]!=hp))return SendClientMessage(playerid,0xFF0000FF,"Your AFK has been interupted prematurely, try not to move!");
//Code
}