forked from FrazzIe/mumble-voip-fivem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.lua
58 lines (54 loc) · 2.39 KB
/
config.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
mumbleConfig = {
voiceModes = {
{2.5, "Whisper"}, -- Whisper speech distance in gta distance units
{8, "Normal"}, -- Normal speech distance in gta distance units
{20, "Shouting"}, -- Shout speech distance in gta distance units
},
speakerRange = 1.5, -- Speaker distance in gta distance units (how close you need to be to another player to hear other players on the radio or phone)
callSpeakerEnabled = true, -- Allow players to hear all talking participants of a phone call if standing next to someone that is on the phone
radioSpeakerEnabled = true, -- Allow players to hear all talking participants in a radio if standing next to someone that has a radio
radioEnabled = true, -- Enable or disable using the radio
micClicks = true, -- Are clicks enabled or not
micClickOn = true, -- Is click sound on active
micClickOff = true, -- Is click sound off active
micClickVolume = 0.1, -- How loud a mic click is
radioClickMaxChannel = 100, -- Set the max amount of radio channels that will have local radio clicks enabled
controls = { -- Change default key binds
proximity = {
key = 20, -- Z
}, -- Switch proximity mode
radio = {
pressed = false, -- don't touch
key = 137, -- capital
}, -- Use radio
speaker = {
key = 20, -- Z
secondary = 21, -- LEFT SHIFT
} -- Toggle speaker mode (phone calls)
},
radioChannelNames = { -- Add named radio channels (Defaults to [channel number] MHz)
[1] = "LEO Tac 1",
[2] = "LEO Tac 2",
[3] = "EMS Tac 1",
[4] = "EMS Tac 2",
[500] = "Hurr Durr 500 Hurr Durr",
}
}
-- Update config properties from another script
function SetMumbleProperty(key, value)
if mumbleConfig[key] ~= nil and mumbleConfig[key] ~= "controls" and mumbleConfig[key] ~= "radioChannelNames" then
mumbleConfig[key] = value
end
end
function AddRadioChannelName(channel, name)
local channel = tonumber(channel)
if channel ~= nil and name ~= nil and name ~= "" then
if not mumbleConfig.radioChannelNames[channel] then
mumbleConfig.radioChannelNames[channel] = tostring(name)
end
end
end
-- Make exports available on first tick
exports("SetMumbleProperty", SetMumbleProperty)
exports("SetTokoProperty", SetMumbleProperty)
exports("AddRadioChannelName", AddRadioChannelName)