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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://b2-scripts.gitbook.io/help/free-product-guides/b2-afk-system/config-and-perms-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
