A powerful and optimized FiveM addon that enables police officers to use an in-vehicle megaphone system. Perfect for traffic stops, operations, and large-scale events with realistic audio effects and extensive customization options.
- ๐ค Enhanced Voice Range: Extends voice chat up to 75 meters while active
- ๐ง Multi-Framework Support: ESX, QBCore, ox_core, and standalone mode with automatic detection
- ๐ Smart Vehicle Detection: Job and vehicle-based permissions (configurable)
- ๐ Realistic Audio Effects: Optional audio submix for authentic megaphone sound
- โจ๏ธ Flexible Controls: Customizable keybind with hold-to-talk functionality
- โฑ๏ธ Anti-Spam Protection: Built-in cooldown system
- ๐ก Visual Feedback: Optional vehicle light effects while active
- ๐ Server Logging: Track all megaphone usage with detailed logs
- ๐ Multi-Language: Support for 9+ languages (EN, DE, FR, ES, IT, PT, RU, TR, PL)
- ๐ฏ Optimized Performance: Minimal resource usage with dynamic thread management
| Requirement | Version | Notes |
|---|---|---|
| FiveM Server | Build 2545+ | Recommended: Latest stable |
| pma-voice | v6.6.2+ | Download |
| Framework | Optional | ESX Legacy, QBCore, ox_core, or standalone |
| Game Build | 2699+ | For best compatibility |
# Clone repository
git clone https://github.com/mleem97/mm_megaphone.git
# Or download latest release
# https://github.com/mleem97/mm_megaphone/releases/latest
- Copy the
mm_megaphonefolder to your server'sresourcesdirectory - Add to your
server.cfg:ensure pma-voice ensure mm_megaphone
- Navigate to
config/config.lua - Adjust settings to match your server setup
- Restart your server or run
refreshandensure mm_megaphone
-- Allowed Jobs
Config.AllowedJobs = { "police", "fib", "sheriff", "state", "immigration" }
-- Vehicle Restrictions
Config.AllowedVehicleClasses = { 18 } -- 18 = Emergency Vehicles
Config.AllowedVehicleModels = { "police", "police2", "police3", "fbi", "sheriff" }
-- Megaphone Settings
Config.MegaphoneRange = 75.0 -- Voice range in meters
Config.Cooldown = 3000 -- Cooldown in milliseconds
Config.UseVisualEffects = true -- Flash vehicle lights
Config.UseSubmix = true -- Enable megaphone audio effectConfig.ActivationKey = 'NUMPAD7' -- Default key (customizable in-game)Available in FiveM Key Mapping:
- Open:
ESC > Settings > Key Bindings > FiveM - Search for: "Car Megaphone"
- Assign your preferred key
Config.Locale = 'en' -- Available: en, de, fr, es, it, pt, ru, tr, pl- Enter a police vehicle as an authorized officer
- Press and hold your configured megaphone key (default:
NUMPAD7) - Speak normally โ your voice will be amplified to the configured range
- Release the key to return to normal voice range
- Monitor usage via server logs (
logs/logs.lua) - Adjust range, cooldown, and effects in
config/config.lua - Customize allowed jobs and vehicles per your server needs
mm_megaphone/
โโโ ๐ config/
โ โโโ config.lua # Main configuration file
โโโ ๐ bridge/
โ โโโ framework.lua # Framework detection & integration
โโโ ๐ client/
โ โโโ main.lua # Core client logic
โ โโโ submix.lua # Audio effects system
โโโ ๐ server/
โ โโโ main.lua # Server-side events
โโโ ๐ logs/
โ โโโ logs.lua # Logging functionality
โโโ fxmanifest.lua # Resource manifest
Config.SubmixEffects = {
defaultParam = 0,
default = 0,
freq_lowParam = 1,
freq_low = 300.0, -- Low frequency cutoff
freq_hiParam = 2,
freq_hi = 5000.0, -- High frequency cutoff
rm_mod_freqParam = 3,
rm_mod_freq = 300.0, -- Ring modulator frequency
rm_mixParam = 4,
rm_mix = 0.2 -- Effect mix level
}Config.EnableFrameworkIntegration = true -- Disable for standalone modeProblem: Megaphone doesn't activate
- โ Ensure you're in an allowed vehicle
- โ
Check that your job is in
Config.AllowedJobs - โ
Verify pma-voice is running:
ensure pma-voice - โ
Check console for errors:
F8in-game
Problem: No audio effect
- โ
Set
Config.UseSubmix = truein config - โ Restart the resource after config changes
- โ Verify pma-voice version compatibility
Problem: Key doesn't work
- โ Check FiveM Key Bindings settings
- โ Try rebinding the key in-game
- โ Ensure no other resource uses the same key
Problem: Works for everyone (no job restriction)
- โ Verify framework is detected: Check server console
- โ
Ensure
Config.EnableFrameworkIntegration = true - โ Confirm your framework is properly installed
Enable verbose logging by adding this to server/main.lua:
Config.Debug = true -- Add to config.luaContributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- โจ Enhanced pma-voice v7.x compatibility
- ๐ง Performance optimizations
- ๐ Extended language support
- ๐ Improved documentation
- โจ Added visual effects
- ๐ง Framework detection improvements
- ๐ Enhanced logging system
This project is licensed under the MIT License - see the LICENSE file for details.
- ๐ Bug Reports: GitHub Issues
- ๐ก Feature Requests: GitHub Discussions
- ๐ง Contact: Open an issue for support
Note: Without an issue submission, bugs cannot be tracked or fixed. Please provide detailed reproduction steps!
If you find this resource helpful, please consider:
- โญ Starring this repository
- ๐ Sharing it with your community
- ๐ Reporting bugs to help improve it
Author: MLeeM
Created: 2025 (Freelance FiveM Development)
GitHub: @mleem97
Made with โค๏ธ for the FiveM Community