> For the complete documentation index, see [llms.txt](https://bros-development.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bros-development.gitbook.io/documentation/free-scripts/markdown/installation.md).

# 📦 Installation

### ⚙️ Installation Guide

Follow these steps to install **BrosDev AFK Kick System** on your FiveM server.

***

#### 📦 1. Download the Resource

Download the latest version from the **Bros Development Tebex store** and extract the folder.

Make sure the folder name stays exactly:

```
BrosDev_AFK_Kick
```

***

#### 📁 2. Add to Resources Folder

Place the resource inside your server `resources` directory:

```bash
resources/[standalone]/BrosDev_AFK_Kick
```

> You can place it anywhere in your resources, but do not rename the folder.

***

#### 🔧 3. Add Required Dependencies

This script is fully **standalone**, but make sure your server is running a proper base build:

Recommended:

* FXServer **cerulean or higher**
* OneSync enabled (recommended)

No framework dependencies are required (ESX / QBCore / QBX auto-detected only if needed).

***

#### ⚙️ 4. Add to server.cfg

Add the resource to your server start list:

```cfg
ensure BrosDev_AFK_Kick
```

Make sure it is started after core resources.

***

#### 🧠 5. Configure the Script

Open:

```
config.lua
```

Here you can fully customize the system:

* ⏱️ AFK kick time (Max AFK duration)
* ⚠️ Warning time before kick
* 🔄 Check interval timing
* 🎨 UI colors and animation behavior
* 📊 Progress bar speed and intensity
* 🪵 Discord webhook logging
* 🧠 Detection sensitivity settings

***

#### 🪵 6. Discord Logging Setup (Optional)

If you want AFK logs in Discord:

* Open `config.lua`
* Paste your webhook:

```lua
Config.WebhookURL = "https://discord.com/api/webhooks/..."
```

This will log:

* Player AFK kicks
* Player identifiers
* Kick reason & timing

***

#### 🎮 7. Start / Restart Resource

After setup:

```bash
restart BrosDev_AFK_Kick
```

Or restart the full server on first install.

***

#### ⚠️ 8. Verify Installation In-Game

Join your server and test:

* Stay inactive until AFK timer starts
* Warning UI should appear
* Countdown should begin
* Player gets kicked after timer ends (if inactive)

***

#### ❗ Troubleshooting

**AFK system not triggering**

* Make sure resource is started (`ensure BrosDev_AFK_Kick`)
* Check F8 console for errors
* Verify AFK time is not too high in config

**UI not showing**

* Ensure NUI files are not blocked
* Check browser console in F8

**Discord logs not working**

* Verify webhook URL is correct
* Ensure internet access from server

***

If you want next, I can:

* make a **super short Tebex “Quick Install” version**
* or unify all your installs into a **single BrosDev documentation style template**
* or create a **premium “setup checklist page” for customers**
