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

# Installation

Installation Guide – Guardian Reports V1

Follow these steps to install and set up Guardian Reports V1 on your FiveM server.

***

### Step 1: Add the Resource

1. Download the Guardian Reports V1 folder.
2. Drag and drop it into your server’s `resources` folder.
3. Add the following line to your `server.cfg`:

```
ensure GuardianReportsV1
```

***

### Step 2: Setup ACE Permissions

1. Open your server’s `server.cfg` or `DiscordAcePerms` config.
2. Add the following permission for your staff role:

```lua
Config.AdminPermission = "guardian.reports"
```

This allows staff members to manage and respond to reports.

***

### Step 3: Configure the Webhook

1. Open `config.lua`.
2. Enable webhooks:

```lua
Config.EnableWebhook = true
```

3. Set your Discord webhook URL:

```lua
Config.WebhookURL = "HERE"
```

```lua
Config.Webhook = {
    Title = 'REPORT',

    Colors = {
        PlayerReport   = 65280,
        BugReport      = 16711680,
        QuestionReport = 10494192,
        GeneralPlayer  = 8388736,
        GeneralAdmin   = 16746240
    },

    Messages = {
        ['player_report']   = { action = 'New Player Report Created', type = 'Category: Player' },
        ['bug_report']      = { action = 'New Bug Report Submitted',  type = 'Category: Bug' },
        ['question_report'] = { action = 'New Question Received',   type = 'Category: Question' },

        ['p_cancel_report'] = { action = 'Report Withdrawn by Player', type = 'ID: #${id}' },
        ['p_answer_report'] = { action = 'Player Sent a Message',      type = 'ID: #${id}' },

        ['a_answer_report'] = { action = 'Staff Response Sent',        type = 'ID: #${id}' },
        ['a_bring_report']  = { action = 'Staff Teleported Player',   type = 'ID: #${id}' },
        ['a_goto_report']   = { action = 'Staff Teleported to Player', type = 'ID: #${id}' },
        ['a_closed_report'] = { action = 'Report Resolved & Closed',  type = 'ID: #${id}' },
    }
}
```

***

### Step 4: Start Your Server

Once setup is complete, restart your server.\
Staff with the `guardian.reports` permission can now use the reporting system, and all reports will log to Discord automatically if the webhook is enabled.
