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

    ⚠️ Recommended settings for PMA Voice : https://docs.tgiann.com/scripts/tgiann-radio/recommended-settings-for-pma-voice ⚠️
    ❗ If you experience any issues with sounds, use the recommended version and PMA settings.❗

    ⚠️⚠️⚠️ Installation : https://docs.tgiann.com/scripts/tgiann-radio/installation ⚠️⚠️⚠️
]]

tgiCoreExports = exports["tgiann-core"]
config = tgiCoreExports:getConfig()

config.lang = "en"              -- Language settings

config.showAvailableFreq = true -- When this setting is true, the frequencies that other players are connected to will be shown on the main page.
config.showPlayerAmount = true  -- When this setting is true, the number of connected players will be displayed on the main page and in the radio (channels with a password will show a dash). If false, the player count will not be displayed
config.passwordEnable = true    -- Players can set passwords on channels when true
config.canOpenWhenArmed = false -- When set to true, the player can use the radio item while holding a weapon

config.volumeOutput = {         -- The intensity of the sound level of the radio speakers relative to the left and right
    left = 1.0,                 -- max 1.0, min 0.0
    right = 1.0                 -- max 1.0, min 0.0
}

config.key = {
    active = true, -- Open on the radio menu when the key is pressed when true (When config.items.active is true, it also controls the item when the key is pressed)
    key = "F9"
}

config.items = {
    active = true, -- When true, the item system is activated
    items = {
        radio = {  -- Item Name
            -- Job names | Table or nil | jobs = { ["police"] = true, ["ambulance"] = true }, | jobs = { ["police"] = { 2, 3, 5 }, "ambulance" }, -- Example with grade
            jobs = {},
            -- Discord perm id | Table or nil | discord = { "1294775830572040282", "3244275130272040282" }
            discord = {},
            -- Ace perm name | Table or nil | acePerms = { "admin", "god" } -- https://forum.cfx.re/t/basic-aces-principals-overview-guide/90917
            acePerms = {},
            -- Default Channel List | Table |  defaultChannels = { "PD1", "PD2", "EMS5" }
            defaultChannels = {},
        },
        pd_radio = {
            jobs = { ["police"] = true },
            defaultChannels = {
                "PD1", "PD2", "PD3", "PD4", "PD5", "EMS5"
            }
        },
        ems_radio = {
            jobs = { ["ambulance"] = { 2, 3, 5 }, ["ambulance2"] = true }, -- Example with grade
            defaultChannels = {
                "EMS1", "EMS2", "EMS3", "EMS4", "EMS5", "PD5"
            }
        }
    }
}

config.restrictChannel = {
    active = true, -- if true, restrict channels will be active
    channels = {
        -- Values are the same as in item config (jobs, acePerms, discord).
        -- Values like [1], [2], [3] are the number of the frequency. (When you connect to frequencies like 1.21, 1.43, 1.52, the config value for [1] is checked.)
        -- disablePlayerAmount: true does not show the number of players connected to the channel
        [1] = { acePerms = { "group.police" }, disablePlayerAmount = true },
        [2] = { jobs = { ["police"] = { 3, 4, 5 }, ["leo"] = true, }, acePerms = { "group.ambulance" }, disablePlayerAmount = true },
        [3] = { jobs = { ["police"] = true, ["ambulance"] = true }, acePerms = { "group.police", "group.ambulance" }, disablePlayerAmount = true },
        [4] = { discord = { '6408948030806425710', '240864823081642572' }, disablePlayerAmount = true },
        [5] = { jobs = { ["police"] = true, ["ambulance"] = true }, disablePlayerAmount = true },
        ["pd-0"] = { jobs = { ["police"] = true, ["ambulance"] = true }, disablePlayerAmount = true },
    }
}

-- you can use the animations you added to the animation list in config.animations
config.animationList = {
    ui = {
        anim = {
            dict = "cellphone@",
            name = "cellphone_text_read_base",
            blendInSpeed = 1.0,
            blendOutSpeed = 1.0,
            startPhase = 0.0
        },
        prop = {
            active = true, -- When true, the walkie talkie prop will be active
            hash = `prop_cs_hand_radio`,
            bone = 57005,
            placement = { 0.14, 0.01, -0.02, 110.0, 120.0, -15.0 },
        }
    },
    talkNormal = {
        anim = {
            dict = "random@arrests",
            name = "generic_radio_enter",
            blendInSpeed = 3.0,
            blendOutSpeed = 3.0,
            startPhase = 1.0
        },
    },
    talkWithProp = {
        anim = {
            dict = "anim@radio_pose_3",
            name = "radio_holding_gun",
        },
        prop = {
            active = true, -- When true, the walkie talkie prop will be active
            hash = `prop_cs_hand_radio`,
            bone = 60309,
            placement = { 0.0750, 0.0470, 0.0110, -97.9442, 3.7058, -23.2367 },
        }
    }
}

config.animations = {
    openUi = { -- When the radio menu is opened, the animation that will be played on the player
        anim = config.animationList.ui.anim,
        prop = config.animationList.ui.prop
    },
    talk = {
        active = true, -- When true, the talk animation will be active
        anim = config.animationList.talkNormal.anim,
        prop = config.animationList.talkNormal.prop
    },
    talkClothe = {
        active = false, -- When true, the talk animation changes according to the your clothe (config.animation.talk is played if the player's clothes do not match config)
        clothes = {
            {
                drawable = 9,         -- https://docs.fivem.net/natives/?_0x67F3780DD425D4FC (drawable list)
                male = { 1, 2, 4 },   -- male variations id (clothe number)
                female = { 1, 2, 4 }, -- female variations id (clothe number)
                anim = config.animationList.talkWithProp.anim,
                prop = config.animationList.talkWithProp.prop
            },
            {
                drawable = 9,
                male = { 5, 6, 7 },   -- male variations id (clothe number)
                female = { 5, 6, 7 }, -- female variations id (clothe number)
                anim = config.animationList.ui.anim,
                prop = config.animationList.ui.prop
            },
        }
    }
}

config.micClickState = true -- If true, all players will have mic click sound on by default
config.micClickCommand = {
    active = true,          -- Activate command to turn micclick sound off and on
    name = "micclick"       -- Command name
}

config.commands = {
    join = {
        active = true,
        command = "r",            -- Command Name
        desc = "commandJoinDesc", -- U can change from lang file
        args = { { name = "frequency", help = "frequency" } }
    },
    leave = {
        active = true,
        command = "rl",           -- Command Name
        desc = "commandLeaveDesc" -- U can change from lang file
    },
    adminJoin = {
        active = true,
        command = "radmin",            -- Command Name
        desc = "commandAdminJoinDesc", -- U can change from lang file
        args = { { name = "frequency", help = "frequency" } },
        perms = config.tgiannServer and { "tgi" } or config.framework == "qb" and "god" or "admin"
    },
    adminRadioList = {
        active = true,
        command = "rlistadmin",             -- Command Name
        desc = "commandAdminRadioListDesc", -- U can change from lang file
        perms = config.tgiannServer and { "tgi" } or config.framework == "qb" and "god" or "admin"
    }
}

config.tgiannGps = GetResourceState("tgiann-gps") ~= "missing" -- If you are using tgiann-gps, this setting should be true
config.defaultVolume = 50                                      -- Default talking sound
config.leaveRadioWhenDie = true                                -- When true, automatically disconnects from all radios when the player dies
config.playerHudDefaultLocation = { x = "15vh", y = "2vh" }
config.uiPlayerColorList = { "#CC4545", "#9D5329", "#CCAE45", "#80CC45", "#2C8158", "#49AD95", "#457BCC", "#7845CC", "#9145CC", "#CC45BE", "#CC4565", "#6A1414", "#E8E8E8", }

config.langs = {}

Last updated