PA | Megaphone
This resource adds a working megaphone system for emergency vehicles, helicopters, and handheld use.
Installation
Make sure you are using the latest version of pma-voice
Enable native audio and submixes
Add these lines into your server.cfg
setr voice_useNativeAudio true
setr voice_enableSubmix 1Drop this resource folder into your resources folder
Add the following line to your server.cfg
ensure cfx-retro-megaphoneOptional
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 megaphoneEnableKeybinds: 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 = custom1: Default GTA effect2: Alternative effect3: Custom effect usingConfig.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 inConfig.PoliceVehicleswill 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 = trueIf 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.0MegaphoneProximity: Range when using vehicle megaphone.HeliMegaphoneProximity: Range when using helicopter megaphone.HandProximity: Range when using handheld megaphone.
Volume Control
Config.CustomVolume = true
Config.CustomVolumeFloat = 1.8CustomVolume: 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 ininventory/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