PHP код:
new Float:AFKPos[MAX_PLAYERS][3]
AFKCounter[MAX_PLAYERS];
AFKCheck(pid){
if(IsPlayerInRangeOfPoint(pid,1.0,AFKPos[pid][0],AFKPos[pid][1],AFKPos[pid][2])){
AFKCounter[pid]++;
}else{
AFKCounter[pid]=0;
}
if(AFKCountr[pid]>=5*60){
ShowPlayerDialog(pid,d_afkanswer,msgbox,"AFK","Are you afk?","Yes","No");
}
GetPlayerPos(pid,AFKPos[pid][0],AFKPos[pid][1],AFKPos[pid][2]);
return 1;
}