Config & Perms Setup

Configuration

The script's behavior can be customized through the config.lua file:

Config = {}

-- Enable/disable AFK system
Config.AFKSystemEnabled = true

-- Idle time in seconds before a player is considered AFK
Config.IdleTimeThreshold = 300 -- 5 minutes

-- Time in seconds before an AFK player is kicked
Config.KickTime = 600 -- 10 minutes

-- Enable/disable invincibility for AFK players
Config.InvincibilityEnabled = true

-- Enable/disable AFK icon display
Config.AFKIconEnabled = true

Permissions Setup

To set up admin/mod exemptions, add the following to your server.cfg or a separate permissions file:

# Create the AFK ignore permission
add_ace group.mod b2_afk_ignore allow
add_ace group.admin b2_afk_ignore allow
add_ace group.god b2_afk_ignore allow

# Assign players to groups (replace with actual identifiers)
add_principal identifier.fivem:1234567890 group.admin

Last updated