FleeLive's AFK Kick System for FiveM
This FiveM resource is a simple AFK Kick System designed to improve server performance and free up slots by automatically kicking inactive players after a set period. It provides a customizable warning and kick timer with a notification and sound alert.
Interested in more resources like this? Join my Discord: https://discord.gg/ZZARjzKvvm
Features
- Detects player inactivity based on movement.
- Sends a warning notification with an icon and sound in the top-leftcorner.
- Kicks players if they remain AFK after the warning period.
- Optimized, runs at 0ms.
Installation
1. Download into your FiveM server's resources folder.
2. Add the following line to your `server.cfg` to ensure the resource is loaded:
ensure FL-AFK_Kick
3. Restart the server or load the resource using:
/ensure FL-AFK_Kick
Configuration
You can modify the AFK timeout and warning time in the `client.lua` client script:
local afkTimeout = 300 -- time in seconds before AFK warning (default: 5 minutes) local afkKickTime = 60 -- time in seconds after warning before kicking (default: 1 minute)
Usage
This resource will automatically monitor player activity:
- If a player is inactive for the `afkTimeout` duration, a notification appears with an icon and sound alerting them they’re about to be kicked.
- If the player remains inactive for `afkKickTime` after the warning, they will be kicked from the server.
License
This project is open-source and can be freely used, modified, and shared. Please provide credit where due.
Edited by FleeLive
FleeLive - KF Creative Studios
This project is open-source and can be freely used, modified, and shared. Please provide credit where due.
Recommended Comments
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.