Config file

--[[ 
    this script needs tgiann-core script to work, you can download the script from your keymaster account
    Start tgiann-core script after es_extented/qb-core script and before tgiann-* scripts
    Adjust the tgiann-core config file according to the framework you are using

Export List
    exports['tgiann-radio']:isRadioOpen()
Client Event List
    tgiann-radio:use    -- Open Radio Event
        TriggerEvent("tgiann-radio:use")
    tgiann-radio:tk     -- Leave Radio Channel
        TriggerEvent("tgiann-radio:tk")
    tgiann-radio:t      -- Join Radio Channel
       TriggerEvent("tgiann-radio:t", "20")

Recommended settings for PMA Voice
    setr voice_useNativeAudio true
    setr voice_useSendingRangeOnly true
    setr voice_defaultVolume 0.3
    setr voice_enableRadioAnim 1
    setr voice_syncData 1
    setr voice_enableSubmix 1
]]

Config = exports["tgiann-core"]:getConfig()
Config.voipScript = "pma" -- "salty" - "mumble" - "pma" - "toko"
Config.useItem = false -- (Need ESX or QB)
Config.ItemName = "radio" -- database item name
Config.EnableRadioKey = true
Config.RaidoKey = "f9" -- https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
Config.CloseKey = 200 -- https://docs.fivem.net/docs/game-references/controls/
Config.LeaveRadioDie = true -- leave the radio when you die
Config.LeaveRadioDrop = true -- leave the radio channel when you drop the item on the ground(Need ESX or QB)

--Required discordroles script for checking discord roles - https://github.com/sadboilogan/discordroles
--Jobs Need ESX or QB
Config.restrictChannel = {
    {channel = 1, acePerms = {"group.police"}},
    {channel = 2, jobs = {"police"}, acePerms = {"group.ambulance"}},
    {channel = 3, jobs = {"police", "ambulance"}, acePerms = {"group.police", "group.ambulance"}},
    {channel = 4, discord = {'6408948030806425710', '240864823081642572'}},
    {channel = 5, jobs = {"ambulance", "police"}},
}
--[[ example
    {channel = 1, acePerms = {"group.police"}},
    {channel = 1, jobs = {"police"}, acePerms = {"group.police"}, discord = {'640894803080642570', '240864823081642572'}},
    {channel = 1, jobs = {"police"}},
    {channel = 1, discord = {'640894803080642570', '240864823081642572'}},
]]

Config.text = {
    ["frequencyNill"] = "Frequency is insufficient",
    ["cantConnect"] = "You can't connect to this frequency",
    ["alreadyFrequency"] = "You are already on this frequency",
    ["notAlreadyFrequency"] = "You are not already on a frequency!",
    ["noRadio"] = "You don't have a radio",
    ["noPerm"] = "You cannot connect to this channel",
    ["leftFrequency"] = "You left the frequency",
    ["mumbleError"] = "This feature does not work in mumble voip",
    ["connect"] = "You connected to frequency %s.00 MHz",
    ["leftFrequencyMhz"] = "You left the frequency %s.00 MHz",
}

--[[ 
    example ace permission (https://forum.cfx.re/t/basic-aces-principals-overview-guide/90917)
    add_ace group.jobs group.police allow
    add_ace group.jobs group.ambulance allow
    add_principal identifier.steam:xxxxxxxxx group.jobs
]]

-- Mumble Voip Setting
Config.ActivatorKey = 137 -- Capslock

-- Tokovoip Setting
Config.tokovoipScriptName = "tokovoip_script" -- "tokovoip" - "toko-voip" - "tokovoip-script" - "tokovoip_script"

-- Salty chat
Config.saltyPrimaryRadio = true

Last updated