# Configuration Files

## 1. Adjust config.lua to your server core

{% tabs %}
{% tab title="ESX" %}

1. Adjusting the script to your server core

```lua
Config.Core = "ESX"
Config.CoreExport = function()
    return exports['es_extended']:getSharedObject()
end
```

2. Adjusting the PlayerLoaded trigger from server core to the script

```lua
Config.PlayerLoaded = "esx:playerLoaded"
```

3. Adjusting the PlayerLogoutServer trigger from server core to the script

```lua
Config.PlayerLogoutServer = "esx:playerDropped"
```

{% endtab %}

{% tab title="QB-Core" %}

1. Adjusting the script to your server core

```lua
Config.Core = "QB-Core"
Config.CoreExport = function()
    return exports['qb-core']:GetCoreObject()
end
```

2. Adjusting the PlayerLoaded trigger from server core to the script

```lua
Config.PlayerLoaded = "QBCore:Client:OnPlayerLoaded"
```

3. Adjusting the PlayerLogoutServer trigger from server core to the script

```lua
Config.PlayerLogoutServer = "QBCore:Server:OnPlayerUnload"
```

{% endtab %}
{% endtabs %}

## 2. Adjust config.lua to server preferences

{% tabs %}
{% tab title="Preferences" %}

1. Menu access options

```lua
Config.CommandName = 'reports'
Config.KeyBind = nil
Config.KeyDescription = nil
```

2. **DatabaseChatSaving**: Every what time should the chats of reports be saved in the database

```lua
Config.DatabaseChatSaving = 10 * 60 * 1000
```

3. **DeleteReportOnClose**: If the ticket is closed it will be automatically deleted and the Reports History section will not be available.

```lua
Config.DeleteReportOnClose = false
```

4. **SaveBySelfOwnTicketToHistory**: When a player closes a report on his own, should it be saved to history?

```lua
Config.SaveBySelfOwnTicketToHistory = false
```

5. **ReportsHistoryTimeLimit**: When the number of seconds specified in this option has passed, older reports after this time will be deleted automatically and will no longer be available. \
   \&#xNAN;*(If you don't want the reports to delete themselves, set as -1)*

```lua
Config.ReportsHistoryTimeLimit = 432000 -- 432000 = 5 days
```

6. **Permissions**: In this section, you can adjust the permissions for each role separately.

```lua
Config.Permissions = {
    ["menu.reports_list"] = {
        admin = true, 
        moderator = true, 
        support = true,
    },
    ["menu.reports_history"] = {
        admin = true, 
        moderator = true, 
    },
    ["action.claim"] = {
        admin = true, 
        moderator = true, 
        support = true,
    },
    ["action.close"] = {
        admin = true, 
        moderator = true, 
        support = true,
    },
    ["action.kick"] = {
        admin = true, 
        moderator = true, 
    },
    ["action.ban"] = {
        admin = true, 
    },
    ["action.teleport_to"] = {
        admin = true, 
        moderator = true, 
        support = true,
    },
    ["action.bring"] = {
        admin = true, 
        moderator = true, 
        support = true,
    }
}
```

{% endtab %}
{% endtabs %}


---

# 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://docs.vames-store.com/assets/vms_reports/configuration-files.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.
