> For the complete documentation index, see [llms.txt](https://b2-scripts.gitbook.io/help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://b2-scripts.gitbook.io/help/free-product-guides/b2-afk-system/config-and-perms-setup.md).

# Config & Perms Setup

### Configuration

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

```lua
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
```
