PA | Megaphone

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


Installation

1

Enable native audio and submixes

Add these lines into your server.cfgsetr voice_useNativeAudio true

setr voice_enableSubmix 1

Those lines must be added above the line ensure pma-voice or ensure [standalone]

2

Drop this resource folder into your resources folder

3

Add the following line to your server.cfg

ensure cfx-retro-megaphone
4

Optional

You can also add

setr voice_disableAutomaticListenerOnCamera 1

to the server.cfg

This changes how audio is heard depending on the camera position.


Configuration

All settings are inside config.lua.

Keybinds

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

Config.MegaphoneEffect = 3 -- 1 = default, 2 = new, 3 = custom
  • 1: Default GTA effect

  • 2: Alternative effect

  • 3: Custom effect using Config.SubmixSettings


Vehicle support

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

Config.OnlyFrontSeats = true

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


Effect distances

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.

If your voice distance does not change after adjusting the values above try istalling v7.0.0 of pma-voice (pay attention to the changes in the changelog)


Volume Control

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

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

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.

Last updated