# Installation

The whole script is basically drag and drop, but you need to add permissions in your server.cfg, see below.

## Server config

Our script is using fivem ACE permission system so we need add permission for our resource to be able to add permission to our predefined groups.

{% hint style="danger" %}
❗ DO NOT CHANGE `resource.rcore_stats` TO ANYTHING ELSE ❗\
This part needs to have the exact name as the resource.
{% endhint %}

Insert this lines into your server.cfg / permissions.cfg (or wherever you store your ACE permissions)

```
add_ace resource.rcore_stats command.add_ace allow
add_ace resource.rcore_stats command.add_principal allow
add_ace resource.rcore_stats command.remove_principal allow
```

## Permissions setup

Permissions are set to default, but you can edit them in the `permissions.lua` file.

This will change the way players can interact with the script, for example who can see server stats, control panel etc.

You can find more about permissions in the [Permissions](/paid-resources/rcore_stats/permissions.md) section.

## Config setup

There are multiple config files that you can adjust to your liking.

You will probably only need to adjust `config.lua` in the root folder.

There are also these, but don't change them unless you know what you are doing:

* `configs/config_performance.lua` - performance settings
* `configs/config_units.lua` - units settings (km/h, mph, etc.)
* `configs/config_other.lua`

You can find more about configs in the [Configs](/paid-resources/rcore_stats/configs/config.md) section.

## Multichar support

If you are using a character selector/multichar system, you will **probably** need to do one small adjustment.

Please talk to your server developer if you are not familiar with this.

You will need to open the multichar script and find the function that is called after player is spawned (or relogged).

Then you can use either a client or server function to trigger player reload:

Client:

```lua
TriggerServerEvent('rcore_stats:server:playerReload')
```

Server:

```lua
-- If you want to call it from the server, you need to provide server id of the player
TriggerEvent('rcore_stats:server:playerReload', playerId)

--Example: (reloading player with server id 2)
TriggerEvent('rcore_stats:server:playerReload', 2)
```


---

# 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://documentation.rcore.cz/paid-resources/rcore_stats/installation.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.
