> For the complete documentation index, see [llms.txt](https://orchid-docs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://orchid-docs.gitbook.io/docs/documentation/our-releases/pa-or-megaphone.md).

# PA | Megaphone

This resource adds a working megaphone system for emergency vehicles, helicopters, and handheld use.

***

## Installation

{% hint style="warning" %}
Make sure you are using the latest version of `pma-voice`
{% endhint %}

{% stepper %}
{% step %}
**Enable native audio and submixes**

Add these lines into your `server.cfg`

```cfscript
setr voice_useNativeAudio true
setr voice_enableSubmix 1
```

{% hint style="info" %}
Those lines must be added above the line `ensure pma-voice` or `ensure [standalone]`
{% endhint %}
{% endstep %}

{% step %}
Drop this resource folder into your `resources` folder
{% endstep %}

{% step %}
Add the following line to your `server.cfg`

```cfscript
ensure cfx-retro-megaphone
```

{% endstep %}

{% step %}
Optional

You can also add&#x20;

```cfscript
setr voice_disableAutomaticListenerOnCamera 1
```

&#x20;to the `server.cfg`

This changes how audio is heard depending on the camera position.
{% endstep %}
{% endstepper %}

***

## Configuration

All settings are inside **`config.lua`**.

### Keybinds

```lua
Config.EnableKeybinds = true -- Enable/Disable keybinds
Config.VehicleMegaphoneBind = 'K' -- Key for vehicle megaphone
Config.HandMegaphoneBind = 'H' -- Key for handheld megaphone
```

* `EnableKeybinds`: Master switch for using keybinds.
* `VehicleMegaphoneBind`: Key used when inside a vehicle.
* `HandMegaphoneBind`: Key used when holding a handheld megaphone (not in vehicle).

***

### Voice Effect

```lua
Config.MegaphoneEffect = 3 -- 1 = default, 2 = new, 3 = custom
```

* `1`: Default GTA effect
* `2`: Alternative effect
* `3`: Custom effect using `Config.SubmixSettings`

***

### Vehicle support

```lua
Config.OnlyFromList = false
Config.PoliceVehicles = {
  [`So2`] = true,
  [`So3`] = true,
  [`So4`] = true,
  [`So5`] = true
}
Config.Helis = {
  [`frogger`] = true,
}
```

* `OnlyFromList`:
  * `true` → Only vehicles listed in `Config.PoliceVehicles` will have megaphone access.
  * `false` → Works in all emergency vehicles.
* `PoliceVehicles`: List of vehicle models allowed to use megaphone.
* `Helis`: List of helicopters allowed to use megaphone.

***

### Only for front seats

```lua
Config.OnlyFrontSeats = true
```

If set to `true` only players in the front seats will be able to use PA (Public Address) system.

***

### Effect distances

```lua
Config.MegaphoneProximity = 20.0
Config.HeliMegaphoneProximity = 48.0
Config.HandProximity = 14.0
```

* `MegaphoneProximity`: Range when using vehicle megaphone.
* `HeliMegaphoneProximity`: Range when using helicopter megaphone.
* `HandProximity`: Range when using handheld megaphone.

{% hint style="info" %}
If your voice distance does not change after adjusting the values above try istalling [<mark style="color:$primary;">v7.0.0</mark> of pma-voice](https://github.com/AvarianKnight/pma-voice/releases/tag/v7.0.0) \
(pay attention to the changes in the changelog)
{% endhint %}

***

### Volume Control

```lua
Config.CustomVolume = true
Config.CustomVolumeFloat = 1.8
```

* `CustomVolume`: Enables bypassing 3D distance and using fixed volume.
* `CustomVolumeFloat`: Adjusts volume multiplier (play around with values).

***

### Framework & Item checker support

```lua
Config.Framework = 'standalone' -- esx | qb-core | qbox | ox | standalone
Config.MegaphoneItemName = 'megaphone'
```

* `Framework`: Choose your framework (standalone requires manual edit in `inventory/client.lua`).
* `MegaphoneItemName`: Item name required for handheld megaphone.

***

### Submix & Settings

```lua
Config.SubmixSettings = {
  freq_low = 289.0,
  freq_hi = 9000.0,
  fudge = 0.5,
  rm_mod_freq = 1.0,
  rm_mix = 0.16,
  o_freq_lo = 548.0,
  o_freq_hi = 8900.0
}
```

Custom audio effect configuration using GTA’s `SetAudioSubmixEffectParamFloat` native.
