> For the complete documentation index, see [llms.txt](https://mole-resource.gitbook.io/mole-resource-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mole-resource.gitbook.io/mole-resource-docs/scripts/pager-system/installation.md).

# Installation

How to install `mr_pager` on your server.

***

## Requirements

| Resource                  | Required | Notes                                                     |
| ------------------------- | -------- | --------------------------------------------------------- |
| `mr_pager_3d`             | Yes      | Streams the `mr_pager` prop model. Ships with the script. |
| `es_extended` / `qb-core` | No       | Without a framework the script runs in standalone mode.   |
| `ox_inventory`            | No       | Used for item checks when it is started.                  |

{% hint style="info" %}
In **standalone** mode there are no items, no jobs and no animations. Every player can open the pager and every message goes to all players.
{% endhint %}

## Steps

{% stepper %}
{% step %}

### Download the resource

Put both folders in your `resources` directory:

```
resources/
└── [mr_pager]/
    ├── mr_pager/
    └── mr_pager_3d/
```

{% endstep %}

{% step %}

### Add the item

Skip this step in standalone mode.

{% tabs %}
{% tab title="ox\_inventory" %}
`ox_inventory/data/items.lua`

```lua
['pager'] = {
    label = 'Pager',
    weight = 100,
    stack = false,
    close = true,
    description = 'Retro pager for job messages.',
},
```

{% endtab %}

{% tab title="QBCore" %}
`qb-core/shared/items.lua`

```lua
pager = {
    name = 'pager',
    label = 'Pager',
    weight = 100,
    type = 'item',
    image = 'pager.png',
    unique = true,
    useable = true,
    shouldClose = true,
    description = 'Retro pager for job messages.',
},
```

{% endtab %}

{% tab title="ESX" %}

```sql
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`)
VALUES ('pager', 'Pager', 1, 0, 1);
```

{% endtab %}
{% endtabs %}

If you use a different item name, change `Config.Items.name`.
{% endstep %}

{% step %}

### Configure

Open `config.lua` and set at least:

* `Config.Framework` – `'auto'`, `'esx'`, `'qb'` or `'standalone'`.
* `Config.Messages.jobs` – which jobs can send messages and from which grade.

See [Configuration file](broken://pages/42b49bf1e35aa7d8958750b01becbf2d71b050b5) for every option.
{% endstep %}

{% step %}

### Start the resource

In `server.cfg`, start the framework and inventory first, then the prop, then the pager:

```cfg
ensure es_extended      # or qb-core
ensure ox_inventory     # optional

ensure mr_pager_3d
ensure mr_pager
```

{% hint style="warning" %}
`mr_pager_3d` **must** start before `mr_pager`. Otherwise the prop model is not registered and the console prints `Model 'mr_pager' is not registered`.
{% endhint %}
{% endstep %}

{% step %}

### Test

1. Give yourself the `pager` item.
2. Press **M** (default) or type `/pager`. The compose window opens.
3. Write a message and press **Enter**. Every online player with the same job and a pager gets it.
4. Test a direct alert from the F8 console:

```lua
exports['mr_pager']:ShowPager('Test message', 5000)
```

{% endstep %}
{% endstepper %}
