Addon Informations
Description
This addon automatically detects AFK (away from keyboard) players by monitoring their position.
If a player is inactive for too long, a warning is sent, and they are kicked if they remain inactive.
This helps to maintain a responsive and populated server environment.
Features
Configuration
Edit the anti_afk.lua file to customize timings:
local afkTime = 300 -- Time (in seconds) before sending a warning
local kickTime = 60 -- Time (in seconds) after warning before kicking
- Name: Automatic Anti-AFK System
- Author: Benjdiii
- Version: 1.0
- Dependencies: None
- Main File: lua/autorun/server/anti_afk.lua
Description
This addon automatically detects AFK (away from keyboard) players by monitoring their position.
If a player is inactive for too long, a warning is sent, and they are kicked if they remain inactive.
This helps to maintain a responsive and populated server environment.
Features
- Inactivity detection based on player movement
- Configurable warning delay and kick timeout
- Personalized warning and kick messages
- Admins and superadmins are fully exempted
- 100% pure Lua, no external dependency
- Lightweight and optimized (low overhead)
- Kick logs printed in the server console
Configuration
Edit the anti_afk.lua file to customize timings:
local afkTime = 300 -- Time (in seconds) before sending a warning
local kickTime = 60 -- Time (in seconds) after warning before kicking