# Configuration

`All In One Pause Menu` uses a configuration file located in:

* `data/config.lua`

This file controls localization, player visuals, item image paths, rules, changelog settings, social links, keybind categories, and menu behavior.

### Localization

```lua
Locale = 'pl' -- 'en' or 'pl'
```

Defines which language should be used.

Supported values:

* `en`
* `pl`

***

### Main Configuration

Example:

```lua
Locale = 'pl',
fallbackAvatar = '...',
UploadUrl = 'https://upload.domain.pl/static',

mapAnimation = {
    enabled   = true,
    animDict  = 'amb@world_human_tourist_map@male@idle_b',
    animName  = 'idle_d',
    propModel = 'p_tourist_map_01_s',
    bone      = 28422,
},

rules = {
    source = 'url',
    url    = 'https://sites.google.com/...',
},

changelog = {
    limit = 10,
},

socialLinks = {
    youtube = 'https://youtube.com/@...',
    tiktok  = 'https://tiktok.com/@...',
    discord = 'https://discord.gg/...',
    shop    = 'https://shop...',
},

keybinds = {
    categories = {
        { id = 'ogolne', label = 'General', icon = 'fa-solid fa-keyboard' },
    },
    list = {
        { key = 'F1', action = 'Phone', category = 'ogolne' },
    },
},
```

### Fallback Avatar

```lua
fallbackAvatar = '...'
```

Defines the avatar image shown if the player Discord avatar cannot be fetched.

***

### Upload URL

```lua
UploadUrl = 'https://upload.domain.pl/static'
```

Defines the base URL used for item and drop images inside the menu.

***

### Map Animation

Controls the animation and prop used when the player opens the pause menu.

```lua
mapAnimation = {
    enabled   = true,
    animDict  = 'amb@world_human_tourist_map@male@idle_b',
    animName  = 'idle_d',
    propModel = 'p_tourist_map_01_s',
    bone      = 28422,
}
```

#### `enabled`

Enables or disables the animation.

* `true` — player holds the map prop while the menu is open
* `false` — no animation is used

#### `animDict`

Animation dictionary used during the pause menu camera sequence.

#### `animName`

Animation name played from the selected dictionary.

#### `propModel`

Prop attached to the player while the menu is open.

#### `bone`

Bone ID used for prop attachment.

***

### Rules

Controls how the Rules tab is populated.

```lua
rules = {
    source = 'url',
    url    = 'https://sites.google.com/...',
}
```

#### `source`

Supported values:

* `url`
* `manual`

#### `url`

Used when `source = 'url'`.

The system fetches and parses the rules page and caches the result.

If you use `manual`, rules should be defined directly in the config or resource logic depending on your implementation.

***

### Changelog

Controls the Discord changelog feed.

```lua
changelog = {
    limit = 10,
}
```

#### `limit`

Defines how many Discord messages should be fetched.

Supported range:

* `1` to `20`

Higher values load more changelog entries.

***

### Social Links

Defines the links displayed inside the pause menu.

```lua
socialLinks = {
    youtube = 'https://youtube.com/@...',
    tiktok  = 'https://tiktok.com/@...',
    discord = 'https://discord.gg/...',
    shop    = 'https://shop...',
}
```

You can customize these links to point to your community pages, Discord server, or store.

***

### Keybinds

The keybind tab is fully configurable through categories and entries.

#### Categories

```lua
keybinds = {
    categories = {
        { id = 'ogolne', label = 'General', icon = 'fa-solid fa-keyboard' },
    },
}
```

Each category includes:

* `id` — internal category identifier
* `label` — displayed category name
* `icon` — Font Awesome icon

#### Keybind List

```lua
list = {
    { key = 'F1', action = 'Phone', category = 'ogolne' },
}
```

Each keybind includes:

* `key` — displayed key or key combination
* `action` — description of the action
* `category` — category ID

Example combo key:

```lua
{ key = 'LSHIFT+G', action = 'Special Action', category = 'ogolne' }
```

***

### Tabs Overview

This resource includes the following tabs:

#### Player

Displays:

* first name
* last name
* job
* cash
* bank balance
* server ID
* ping
* player count
* Discord avatar

#### MiniMap

Displays a live satellite-style map of San Andreas with the player’s current position.

#### Daily Tasks

Displays 3 randomly assigned daily tasks per player.

Each task includes:

* difficulty
* target amount
* reward item
* live progress bar

Daily tasks are stored in MySQL and reset automatically each day.

#### Rules

Displays your server rules using either:

* a remote URL source
* a manual static source

#### Changelog

Displays messages fetched from a Discord channel.

Each entry can include:

* author avatar
* timestamp
* formatted message content

#### Keybinds

Displays all configured keybinds grouped by category.

#### Commands

Displays all chat suggestions registered through:

* `chat:addSuggestion`
* `chat:addSuggestions`

The command list can be searched directly in the UI.

***

### Required Convars

This resource uses two required convars:

```lua
set msk_pausemenu:discordToken "YOUR_BOT_TOKEN"
set msk_pausemenu:changelogChannel "CHANNEL_ID"
```

#### `discordToken`

Used to fetch:

* Discord avatars
* changelog messages

#### `changelogChannel`

Defines which Discord channel is used as the changelog source.

***

### Export

This resource provides the following export for daily task progression:

```lua
exports['msk_pausemenu']:IncrementTask(playerId, taskId, amount)
```

#### Example

```lua
exports['msk_pausemenu']:IncrementTask(source, 'catch_fish', 1)
```

#### Behavior

* `playerId` — target player source
* `taskId` — task identifier
* `amount` — progress increment amount

If `amount` is not provided, it defaults to `1`.

When a task reaches its target, the resource triggers:

```lua
msk_pausemenu:taskCompleted
```

***

### Notes

* The native ESC pause menu is fully blocked while this menu is open
* `mapAnimation.enabled = false` disables the map prop animation
* Changelog requires a valid Discord bot token
* If Discord configuration is missing, the changelog tab will show an empty state
* Rules loaded from `url` are cached after the first fetch
* Daily tasks reset automatically each day


---

# 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://mskscripts.gitbook.io/mskscripts/scripts/all-in-one-pause-menu/configuration.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.
