15.02.2018, 15:07
Код:
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;
}

