# Config and Permissions

## Basic configuration

```lua
Config.CommandName = 'luman-dragon' -- Command name
Config.CommandAdminOnly = true -- Admin only
```

## Permissions

By default command for dragon spawn is available only to main administrators. To allow other players use the command you can add access for them via `server.cfg`:

```
# example #1
add_ace group.dragon-access command.luman-dragon allow
add_principal identifier.license:rjridjs38382 group.dragon-access

# example #2
add_ace group.donator-group command.luman-dragon allow
add_principal identifier.license:rjridjs38382 group.donator-group
```

{% hint style="info" %}
More details about how it works in [ACE Permissions](https://forum.cfx.re/t/basic-aces-principals-overview-guide/90917) guide.
{% endhint %}

{% hint style="info" %}
You also can totally enable the command to all players on the server in `config.lua` by setting `Config.CommandAdminOnly = false`.
{% endhint %}

### Permissions by Player Identifiers

You can restrict access per specific dragons. For this add player identifiers into `allowedOnlyToPlayersWithIdentifiers`. From now only players with these identifiers will have access to the dragon. Example:

```lua
Config.Dragons = {
    -- Golden Dragon. Use command `/luman-dragon 1`
    {
        hash = `a_c_lumandragon_01`,
        outfit = 0,
        ...
        cameraDistance = 11.0,
        allowedOnlyToPlayersWithIdentifiers = {
            "fivem:70175",
            "discord:452471793853267973",
            "steam:21000000020000",
            "license:1rerd5d1234b7cc33c2de13fc0fer5e2dbc3f432",
        },
    },
}
```

## Advanced Configuration

```lua
----------------------------
-- Advanced Configuration --
----------------------------
Config.AllowDamageToDragonByBullets = true -- see shared/damage.lua
Config.AllowDamageToDragonByMelee = true -- see shared/damage.lua
Config.SummonCooldown = 60000 -- milliseconds
Config.FireCharging = {
    Enabled = true,
    MAX_FIRE_CHARGE = 100,
    CRITITCAL_FIRE_CHARGE = 10,
    DECREASE_FIRE_CHARGE_EVERY_MS = 100,
    INCREASE_FIRE_CHARGE_EVERY_MS = 5000,
    UI_POS_X = 0.5,
    UI_POS_Y = 0.95,
}
Config.Health = {
    UI_POS_X = 0.5,
    UI_POS_Y = 0.925,
}
Config.ToggleUIButton = 9 -- Tab button. See: https://cherrytree.at/misc/vk.htm / https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes

--------------------------------------------------------
-- Experimental options. Change them on your own risk --
--------------------------------------------------------
Config.DragonSpeedLimitEnabled = true
Config.DragonSpeedLimit = 20.0
Config.AllowDamageToDragonByFire = false
```


---

# 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://lumanstudio.gitbook.io/docs/redm-scripts/dragon-rider/config-and-permissions.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.
