AFK system
#1

Код:
public AntiAFK(playerid)
{
	new Float:Pos[3];
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		GetPlayerPos(i, Pos[0], Pos[1], Pos[2]);
		if(IsPlayerInRangeOfPoint(i, 2, Pos[0], Pos[1], Pos[2]))
		{
			AFKSeconds[i]++;
		}
		if(AFKSeconds[i] == 600)
		{
			new string[255];
			format(string, sizeof(string), "%s has been kicked by AdmBot for being AFK without sleep for more than 10 minutes", pInfo[playerid][pName]);
			SCMTOALL(COLOR_INDIANRED, string);
		}
	}
	return 1;
}
is any method to make that work only with one timer, beacause this methot will check the pos at 1 second ant it will not check if i am afk because when it's saving my pos is checking if is same position and i don't want that because it will add afkseconds if i'm moving
Reply


Messages In This Thread
AFK system - by C0oL3r - 15.02.2018, 15:07
Re: AFK system - by grymtn - 15.02.2018, 15:15
Re: AFK system - by C0oL3r - 15.02.2018, 15:28
Re: AFK system - by C0oL3r - 15.02.2018, 15:36
Re: AFK system - by C0oL3r - 15.02.2018, 15:38
Re: AFK system - by grymtn - 15.02.2018, 15:41
Re: AFK system - by C0oL3r - 15.02.2018, 15:53
Re: AFK system - by PepsiCola23 - 15.02.2018, 15:59
Re: AFK system - by Sew_Sumi - 15.02.2018, 17:50
Re: AFK system - by grymtn - 15.02.2018, 22:39

Forum Jump:


Users browsing this thread: 1 Guest(s)