General Configuration
This guide will help you configure the script to suit your needs, covering all available options in the config.lua
file. Each setting is explained step by step.
1. General Configuration
Language
Set the language used by the script.
Config.Language = 'en' -- Available options: 'en' (English), 'fr' (French)
Use Outdated Version
Enable this option to suppress alert messages when using an older version of the script.
Config.UseOutdatedVersion = false -- Set to true if using an outdated script version.
2. Framework Compatibility
If you're using a framework like ESX, QB, or OX Inventory, enable this setting.
Config.UseFramework = false
When
true
, the system uses the inventory (e.g., weapon usage) instead of command-based interactions.Setup instructions for each framework are available on:
3. Voice System Compatibility
Note: Only one voice system can be enabled at a time.
PMA-Voice Compatibility
Enable this option if your server uses PMA-Voice.
Config.Compatibility.PMAVoice = {
enabled = false, -- Set to true if using PMA-Voice.
resourceName = 'pma-voice' -- Name of the PMA-Voice resource.
}
Important: If enabled, check the official documentation.
SaltyChat Compatibility
Enable this option if your server uses SaltyChat.
If you're not sure which version of SaltyChat you are using:
Try enabling the new version (
UseNewVersion = true
).Launch the game and test the megaphone.
If you see an error in the F8 client console, switch to
UseNewVersion = false
and setUseOldVersion = true
.
Config.Compatibility.SaltyChat = {
UseNewVersion = true, -- Use this for the latest SaltyChat (LUA or C# integration)
UseOldVersion = false -- Use this for older versions of SaltyChat support
}
YACA Compatibility
Enable this option if your server uses YACA.
Config.Compatibility.YACA = {
enabled = false, -- Enable if using YACA.
resourceName = 'yaca' -- Name of the YACA resource.
}
Mumble-VOIP Compatibility
Enable this option if your server uses Mumble-VOIP.
Config.Compatibility.MumbleVOIP = false -- Set to true if using Mumble-VOIP.
Important: If enabled, check the official documentation for further setup.
4. Megaphone Behavior Settings
Auto Push-to-Talk
Automatically activates push-to-talk while using the megaphone.
Config.AutoTalk = true -- Set to true to auto-enable push-to-talk when using the megaphone.
Talk Distance
Defines the speaking range of the megaphone.
Config.TalkDistance = 35.0 -- Adjust the distance players can hear the megaphone.
For PMA-Voice users, modify this in @pma-voice/client/megaphone.lua
.
Manage Volume
Allows players to adjust megaphone volume.
Config.ManageVolume = true -- Set to true to enable volume control.
Config.Volume = 1.0 -- Default volume level.
Voice Effects
Applies frequency filters to simulate a real megaphone sound.
Config.Effects = {
frequencyLow = 200.0, -- Low-frequency filter.
frequencyHigh = 9000.0 -- High-frequency filter.
}
5. Vehicle Configuration
Enable Megaphone in Vehicles
Allows megaphone usage while inside a vehicle.
Config.Vehicles.enabled = true -- Set to true to enable in-vehicle megaphone.
Vehicle Notification Hint
Displays a notification when inside a vehicle with a megaphone.
Config.Vehicles.hint = {
enabled = true, -- Show hint at the top left of the screen.
timeout = 4000 -- Display duration in ms.
}
Restrict to Emergency Vehicles
Limits megaphone use to emergency vehicles only.
Config.Vehicles.emergencyOnly = true -- Set to true to restrict usage to emergency vehicles.
Additional Allowed Vehicles
Specify additional vehicles that can use the megaphone.
Config.Vehicles.additionalVehicles = {
'police',
'fbi'
}
Allowed Seat Positions
Define which vehicle seats can use the megaphone.
Config.Vehicles.allowedSeats = {-1, 0} -- -1 = Driver, 0 = Front Passenger.
6. Megaphone Weapon Settings
Define Megaphone as a Weapon
Sets the megaphone as a weapon in the game.
Config.Weapon = `WEAPON_MEGAPHONE` -- Megaphone weapon identifier.
Megaphone Display Name
Name displayed in the weapon wheel when equipping the megaphone.
Config.MegaphoneWeaponName = "Megaphone"
7. Key Bindings
Keys for Interaction
Set the keys used for speaking into the megaphone.
Config.Keys = {
SpeakKey = 92, -- Key to activate megaphone speaking.
SpeakKeyString = '~INPUT_VEH_PASSENGER_ATTACK~', -- Display name for SpeakKey.
SpeakInVehicleKey = 311, -- Key to activate megaphone inside a vehicle.
SpeakInVehicleKeyString = '~INPUT_REPLAY_SHOWHOTKEY~' -- Display name for SpeakInVehicleKey.
}
Refer to the FiveM Control Reference for a list of control codes.
8. Language Library
Edit the text displayed for different actions in multiple languages.
Last updated