> 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/scripts/images-and-media/installation.md).

# 📦 Installation

🔧 Installation Guide

Follow the steps below to properly install and configure **Bros Development — Advanced Connecting Card V2** on your FiveM server.

***

## 📁 Step 1 — Add The Resource

Place the resource folder inside your server resources directory:

```bash
resources/[local]/BrosDev_Connecting
```

Recommended structure:

```bash
resources
└── [local]
    └── BrosDev_Connecting
```

***

## ⚙️ Step 2 — Add Required Permissions

Open your `server.cfg` and add the following lines:

```cfg
add_principal identifier.license:YOUR_LICENSE_HERE group.brosadmin
add_ace group.brosadmin command.wl allow
add_ace group.brosadmin command.brosban allow
```

***

### 🔍 Replace Your License

Replace:

```cfg
YOUR_LICENSE_HERE
```

with your actual FiveM license identifier.

Example:

```cfg
add_principal identifier.license:abcd123456789 group.brosadmin
```

This gives you permission to use:

* `/wl` commands
* `/brosban` commands

***

## 🚀 Step 3 — Ensure The Resource

Add the script to your `server.cfg`:

```cfg
ensure BrosDev_Connecting
```

Recommended placement:

```cfg
ensure sessionmanager
ensure mapmanager
ensure chat

ensure BrosDev_Connecting
```

***

## ⚙️ Step 4 — Configure The Script

Open:

```bash
BrosDev_Connecting/config.lua
```

Inside this file you can customize:

* Discord whitelist system
* Priority queue
* Ban system
* Background images
* Messages
* Colors
* Emojis
* Queue settings
* Admin bypass
* Discord logging
* VPN protection
* Buttons & card visibility

***

## 🔒 Step 5 — Choose Whitelist Mode

Inside `config.lua`:

***

### 🟣 Discord Whitelist Mode (Recommended)

```lua
Config.WhitelistMode = "discord"
```

Uses Discord roles to whitelist players.

***

### 📄 JSON Whitelist Mode

```lua
Config.WhitelistMode = "own"
```

Uses the built-in JSON whitelist file only.

***

## 💬 Step 6 — Discord Bot Setup (Required For Discord Mode)

If using:

```lua
Config.WhitelistMode = "discord"
```

you must create and configure a Discord bot.

***

## 🤖 Create Discord Bot

Go to:

```bash
https://discord.com/developers/applications
```

Then:

1. Click **New Application**
2. Name your bot
3. Open the **Bot** tab
4. Click **Add Bot**
5. Reset & copy your bot token

***

## 🔑 Enable Required Intents

Inside the Bot page enable:

* ✅ Server Members Intent
* ✅ Message Content Intent

***

## 🔗 Invite Bot To Your Server

Replace:

```bash
YOUR_CLIENT_ID
```

with your Application ID:

```bash
https://discord.com/api/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=268436480&scope=bot
```

***

## 🛠️ Enable Discord Developer Mode

Inside Discord:

```bash
Discord Settings → Advanced → Developer Mode → ON
```

***

## 📋 Required Discord IDs

You will need:

| ID                | How To Get                            |
| ----------------- | ------------------------------------- |
| Guild ID          | Right click server → Copy Server ID   |
| Whitelist Role ID | Right click role → Copy Role ID       |
| Banned Role ID    | Right click role → Copy Role ID       |
| Log Channel ID    | Right click channel → Copy Channel ID |

***

## ⚙️ Configure Discord Settings

Fill inside `config.lua`:

```lua
Config.Discord = {
    BotToken        = "YOUR_BOT_TOKEN_HERE",
    GuildID         = "123456789012345678",
    WhitelistRoleID = "123456789012345678",
    BannedRoleID    = "123456789012345678",
    LogEnabled      = true,
    LogChannelID    = "123456789012345678",
}
```

***

## 🎨 Step 7 — Configure Backgrounds

Customize card backgrounds:

```lua
Config.Backgrounds = {
    Welcome = "YOUR_IMAGE_URL",
    Denied  = "YOUR_IMAGE_URL",
    Banned  = "YOUR_IMAGE_URL",
    Queue   = "YOUR_IMAGE_URL",
    Pending = "YOUR_IMAGE_URL",
    Full    = "YOUR_IMAGE_URL",
}
```

***

### ✅ Recommended Background Size

* Minimum: `700x300`
* Recommended: `1920x1080`

Supported formats:

* PNG
* JPG

Images must be hosted publicly.

***

## 🌈 Step 8 — Customize Colors & Emojis

Everything is configurable:

```lua
Config.Colors
Config.Emojis
Config.Messages
Config.Divider
```

You can fully match the card system to your server branding.

***

## ⭐ Step 9 — Configure Queue System

Queue settings:

```lua
Config.Queue = {
    Enabled = true,
    MaxSize = 20,
    UpdateTime = 5000,
}
```

***

### 👑 Priority Queue Tiers

Example:

```lua
{
    name   = "VIP",
    roleId = "ROLE_ID",
    weight = 50,
    emoji  = "⭐",
}
```

Higher weight = higher queue priority.

***

## 🔨 Step 10 — Configure Ban System

Supports:

* Discord role bans
* Local JSON bans
* Permanent bans
* Temporary bans

Example command:

```bash
/brosban add license:xxxxxxxx 1440 Toxic behavior
```

***

## 🔄 Step 11 — Restart The Resource

Restart your server or resource:

```bash
restart BrosDev_Connecting
```

***

## ✅ Installation Complete

Your Advanced Connecting Card V2 system is now fully installed and ready to use.

Players will now receive:

* Modern connection cards
* Queue handling
* Discord whitelist verification
* Ban checks
* Priority queue support
* Professional server onboarding

***

## 📁 Included Files

```bash
config.lua
server.lua
whitelist.json
banned.json
queue_backup.json
fxmanifest.lua
```

***

## 🔐 Escrow Protection

| File               | Access              |
| ------------------ | ------------------- |
| config.lua         | ✅ Editable          |
| whitelist.json     | ✅ Editable          |
| banned.json        | ✅ Editable          |
| queue\_backup.json | ⚙️ Auto Managed     |
| server.lua         | 🔒 Escrow Protected |

***

## 📫 Need Support?

Need help with setup or customization?

### 🌐 Discord Support

```bash
https://discord.gg/tXFS5UfTUv
```

Additional support and updates are available through Bros Development Discord.
