> For the complete documentation index, see [llms.txt](https://izaap-studios.gitbook.io/izaap-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://izaap-studios.gitbook.io/izaap-scripts/pause-menu/installation-and-configuration.md).

# Installation & Configuration

### Downloading Dependencies

iZaap PauseMenu does **not require SQL**.

Optional framework support:

```cfg
qb-core
qbx_core
es_extended
standalone
```

The resource can detect the framework automatically using:

```lua
Config.Framework = 'auto'
```

***

### Installation

#### Step 1

Put the resource inside your server resources folder.

Example:

```txt
resources/[izaap]/izaap_pausemenu
```

***

#### Step 2

Add the resource to your `server.cfg`.

```cfg
ensure izaap_pausemenu
```

Recommended order:

```cfg
ensure qb-core
# or ensure qbx_core
# or ensure es_extended

ensure izaap_pausemenu
```

If you are using standalone mode, you can simply start the script normally:

```cfg
ensure izaap_pausemenu
```

***

### SQL

This resource does **not require any SQL file**.

No database import is needed.

***

### Configuration

Open `config.lua` and configure the resource.

```lua
Config = {}

Config.Debug = false

-- auto / qb / qbx / esx / standalone
Config.Framework = 'auto'

Config.Command = 'pausemenu'
Config.OpenWithCommand = true

Config.ServerName = 'iZaap Scripts'
Config.BrandShort = 'IZ'
Config.Accent = '#f8c82c'
```

***

### Command

Default command:

```txt
/pausemenu
```

You can change it from:

```lua
Config.Command = 'pausemenu'
```

To any command you want:

```lua
Config.Command = 'menu'
```

If you want to disable opening the menu by command:

```lua
Config.OpenWithCommand = false
```

***

### Main Buttons

You can enable or disable the main pause menu buttons from `config.lua`.

```lua
Config.Buttons = {
    Resume = true,
    Settings = true,
    Map = true,
    Disconnect = true,
}
```

#### Available buttons

| Button     | Description                                     |
| ---------- | ----------------------------------------------- |
| Resume     | Closes the pause menu and returns to the game   |
| Settings   | Opens the custom settings page                  |
| Map        | Opens the GTA map                               |
| Disconnect | Allows the player to disconnect from the server |

***

### Disconnect Option

You can enable or disable the disconnect button.

```lua
Config.Disconnect = {
    Enabled = true,
    DropMessage = 'You disconnected from the server.'
}
```

If disabled:

```lua
Config.Disconnect = {
    Enabled = false,
    DropMessage = 'You disconnected from the server.'
}
```

***

### Server Stats

Jobs counted as active officers can be configured here:

```lua
Config.OfficerJobs = {
    police = true,
    sheriff = true,
    lspd = true,
    bcso = true,
}
```

These jobs will be counted in the police/officer stat card inside the pause menu.

You can add more jobs:

```lua
Config.OfficerJobs = {
    police = true,
    sheriff = true,
    ambulance = true,
    mechanic = true,
}
```

***

### Social Buttons

The pause menu includes social buttons for your community links, such as:

```txt
Discord
Store
YouTube
```

Configure the links from `config.lua`.

Example:

```lua
Config.Socials = {
    Discord = {
        Enabled = true,
        Icon = 'discord',
        Link = 'https://discord.gg/yourserver'
    },

    Store = {
        Enabled = true,
        Icon = 'store',
        Link = 'https://store.izaapscripts.com/'
    },

    YouTube = {
        Enabled = true,
        Icon = 'youtube',
        Link = 'https://youtube.com/@yourchannel'
    },
}
```

Players can click the icons directly from the pause menu.

***

### Background Music

The pause menu supports optional background music.

```lua
Config.Music = {
    Enabled = true,
    URL = 'YOUR_YOUTUBE_OR_AUDIO_LINK',
    Volume = 0.35,
}
```

#### Options

| Option  | Description                                |
| ------- | ------------------------------------------ |
| Enabled | Enables or disables menu music             |
| URL     | YouTube/audio link used for the menu music |
| Volume  | Default volume when opening the menu       |

Example:

```lua
Config.Music = {
    Enabled = true,
    URL = 'https://www.youtube.com/watch?v=example',
    Volume = 0.25,
}
```

Players can control the music volume from the pause menu settings.

***

### Settings Page

The pause menu includes a custom settings page.

From this page, players can:

```txt
Enable or disable music
Change music volume
Access advanced GTA settings
Return to the main pause menu
```

The advanced settings option opens the native GTA settings menu.

***

### Cinematic Mode

The pause menu includes a cinematic camera mode.

```lua
Config.Cinematic = {
    Enabled = true,
    FreezePlayer = true,
    HideHud = true,
    Fov = 35.0,
    InterpTime = 650,

    FrontOffset = 2.45,
    HeightOffset = 0.65,
    SideOffset = 0.0,
}
```

#### Options

| Option       | Description                                    |
| ------------ | ---------------------------------------------- |
| Enabled      | Enables cinematic camera when opening the menu |
| FreezePlayer | Freezes the player while the menu is open      |
| HideHud      | Hides the HUD while the menu is open           |
| Fov          | Camera field of view                           |
| InterpTime   | Smooth camera transition time                  |
| FrontOffset  | Camera distance in front of the player         |
| HeightOffset | Camera height                                  |
| SideOffset   | Camera side position                           |

***

### Tablet Animation

The pause menu can display a tablet prop while the player is using the menu.

```lua
Config.Tablet = {
    Enabled = true,
    Model = 'prop_cs_tablet',

    Dict = 'amb@code_human_in_bus_passenger_idles@female@tablet@idle_a',
    Anim = 'idle_a',
    Flag = 49,

    Bone = 28422,

    Offset = vec3(-0.035, -0.018, 0.005),
    Rotation = vec3(8.0, -72.0, -6.0)
}
```

#### Options

| Option   | Description                              |
| -------- | ---------------------------------------- |
| Enabled  | Enables or disables the tablet animation |
| Model    | Tablet prop model                        |
| Dict     | Animation dictionary                     |
| Anim     | Animation name                           |
| Flag     | Animation flag                           |
| Bone     | Player bone where the tablet is attached |
| Offset   | Tablet position in the hand              |
| Rotation | Tablet rotation in the hand              |

***

### Usage

After installing and starting the resource, players can open the pause menu with:

```txt
/pausemenu
```

From the pause menu, players can:

```txt
Resume the game
Open settings
Open the GTA map
Disconnect from the server
Open Discord, store or YouTube links
Adjust music options
Use cinematic pause menu view
```

***

### Troubleshooting

#### The menu does not open

Check that the resource is started:

```cfg
ensure izaap_pausemenu
```

Also make sure the command is enabled:

```lua
Config.OpenWithCommand = true
```

***

#### The command does not work

Check your command name:

```lua
Config.Command = 'pausemenu'
```

Then use:

```txt
/pausemenu
```

If you changed it, use the new command.

***

#### Music does not play

Make sure music is enabled:

```lua
Config.Music.Enabled = true
```

Check that the URL is valid.

Some YouTube links may be blocked by browser autoplay rules. If that happens, use a direct `.mp3` audio link for best compatibility.

***

#### Social icon looks broken

Make sure the icon name or image path exists.

Example:

```lua
Icon = 'discord'
```

Or use a valid image path inside your NUI files.

***

### Final Steps

Import is not required because this resource has no SQL.

Start the script:

```cfg
ensure izaap_pausemenu
```

Configure your framework in `config.lua`.

Configure your buttons, music, cinematic mode, tablet animation and social links.

Use the command:

```txt
/pausemenu
```
