rytrak.fr Documentation
  • 🛡️FiveM Assets Escrow
    • You lack the required entitlement
    • Failed to verify protected resource
    • Error parsing script / Failed to load script
  • ❓Store FAQ
    • Do you accept orders to create a custom script
    • Do you give decrypted scripts
    • What payment methods are accepted for the purchase of your scripts?
    • Do you offer discounts or special offers on your scripts?
    • Can I modify or customize your scripts to meet my needs
    • Are your scripts compatible with frameworks
    • Do you provide development assistance?
  • FiveM Scripts
    • 🚒Firefighter SCBA System
      • General Configuration
      • Adapt your EUP
      • General Exports
      • General Events
      • ❓FAQ
        • No such export IsFireNearby in resource SmartFires
      • Test it now
    • 👮‍♂️Advanced Police Grab Ped
      • General Configuration
      • General Exports
      • General Events
      • Compatibility with esx_policejob
      • Test it now
    • 🚿Advanced Pepper Spray
      • General Configuration
      • General Exports
      • Anticheat
      • Test it now
    • 📣Advanced Megaphone System
      • General Configuration
      • General Exports
      • Compatibility with pma-voice
      • Compatibility with mumble-voip
      • Compatibility with saltychat
      • ❓FAQ
        • I can't hear my voice through the megaphone
      • Test it now
    • 🚁Advanced Helicopter Bucket
      • General Configuration
      • Adapt our script with ToxicFire
      • General Exports
      • 🔐Test it now
    • 🔗Advanced Remote Restraint
      • General Configuration
      • General Exports
      • Test it now
    • 🚗Advanced Extrication System
      • General Configuration
      • General Exports
      • Adapt a vehicle to the roof system
      • List of vehicles compatible with the roof system
      • 🔐Test it now
    • 🔗Advanced Handcuffs System
      • General Configuration
      • General Exports
      • Make ESX compatible
      • Make QBCore compatible
      • Make OX-Inventory compatible
      • 🔐Test it now
    • ✈️Advanced Aerial Firefighting
      • General Configuration
      • Adapt our script with ToxicFire
      • General Exports
      • 🔐Test it now
    • 💣Advanced Tactical Gas System
      • General Configuration
      • Test it now
  • RedM Scripts
    • 🤠Advanced Sheriff Grab Ped
      • General Configuration
      • General Exports
  • Framework compatibility
    • Add a custom weapon on ESX
    • Add a custom weapon on QBCore
    • Add a custom weapon on OX Inventory
  • 🚀Test our resources for free with Zap-Hosting
Powered by GitBook
On this page
  • 1. General Configuration
  • 2. Framework Compatibility
  • 3. Voice System Compatibility
  • 4. Megaphone Behavior Settings
  • 5. Vehicle Configuration
  • 6. Megaphone Weapon Settings
  • 7. Key Bindings
  • 8. Language Library
  1. FiveM Scripts
  2. Advanced Megaphone System

General Configuration

PreviousAdvanced Megaphone SystemNextGeneral Exports

Last updated 8 days ago

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.
}

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 set UseOldVersion = 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.

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.
}

8. Language Library

Edit the text displayed for different actions in multiple languages.

Important: If enabled, check the .

Important: If enabled, check the for further setup.

Refer to the for a list of control codes.

📣
ESX Guide
QBCore Guide
OX Inventory Guide
official documentation
official documentation
FiveM Control Reference