Full Configuration Breakdown
Server-side Configuration (config.lua
)
config.lua
)Voice Warning Settings
Config.VoiceWarning = {
checkInterval = 1000 -- How often to check voice connection (in ms)
}
Voice Control Features
Config.VoiceControl = {
-- Mute Toggle
muteToggle = {
enabled = true,
hotkey = 'M', -- Default key to mute/unmute
notification = true, -- Show notification when toggling mute
showIndicator = true -- Show persistent UI indicator when muted
},
-- Talk Range Control
talkRange = {
enabled = true,
hotkey = 'Z', -- Default key to cycle through ranges
ranges = {1.0, 5.0, 15.0, 30.0}, -- Available talk ranges (meters)
defaultIndex = 2, -- Default range index in the ranges array (1-based)
drawMarker = true, -- Whether to draw a marker showing the current range
marker = {
type = 1,
color = {r = 0, g = 0, b = 255, a = 100},
bobUpAndDown = false,
faceCamera = false,
rotate = false,
drawDistance = 50.0,
zOffset = -2.15,
height = 2.25,
displayDuration = 2000
},
notification = true -- Show notification when changing range
},
-- Pause Menu Control
pauseMenuControl = {
enabled = true,
hideInPauseMenu = true, -- Automatically hide UI when pause menu is active
checkInterval = 500, -- How often to check pause menu state (in ms)
gracePeriod = 15000 -- Time in ms to keep UI hidden after pause menu closes
}
}
Notification System Configuration
Config.Notifications = {
system = 'x_hud_notify',
duration = 5000,
types = {
esx = {
mute = 'error',
unmute = 'success',
range = 'info'
},
qbcore = {
mute = 'error',
unmute = 'success',
range = 'primary'
},
x_hud = {
mute = 'mute',
unmute = 'unmute',
range = 'range'
}
}
}
Notification Function
function SendNotification(message, title, type)
-- Default notification type to 'info' if not specified
if not type then type = 'info' end
-- Handle ESX notifications
if Config.Notifications.system == 'esx' then
local notificationType = Config.Notifications.types.esx[type] or 'info'
exports["esx_notify"]:Notify(notificationType, Config.Notifications.duration, message)
-- Handle QBCore notifications
elseif Config.Notifications.system == 'qbcore' and QBCore then
local notificationType = Config.Notifications.types.qbcore[type] or 'primary'
exports['qb-core']:DrawText(message, notificationType)
-- Handle X_HUD notifications
elseif Config.Notifications.system == 'x_hud_notify' then
local notificationType = Config.Notifications.types.x_hud[type] or 'info'
exports['X_HUD_Notify']:Notify(message, notificationType, Config.Notifications.duration)
-- Default to native notifications
else
BeginTextCommandThefeedPost("STRING")
AddTextComponentSubstringPlayerName(message)
EndTextCommandThefeedPostTicker(true, true)
end
end
UI Configuration (config.js
)
config.js
)Default Language
defaultLang: 'en',
Animations
animations: {
fadeInDuration: 300,
fadeOutDuration: 300
}
Mute Indicator
muteIndicator: {
position: {
vertical: 'bottom',
horizontal: 'center',
verticalPercent: 8,
horizontalPercent: 50
},
layout: {
direction: 'vertical',
iconMargin: 8,
alignItems: 'center'
},
size: {
padding: '12px 18px',
maxWidth: 250,
borderRadius: 8
},
border: {
width: 2,
style: 'solid',
color: 'rgba(121, 121, 121, 0.5)',
glow: {
color: 'rgba(255, 59, 48, 0.7)',
blur: 15,
spread: 3,
intensity: 3
}
},
glass: {
enabled: true,
blurStrength: 4,
opacity: 0.6,
backgroundColor: 'rgba(255, 59, 48, 0.08)',
boxShadow: '0 4px 12px rgba(0, 0, 0, 0.3)',
shine: {
enabled: true,
color: 'rgba(255, 255, 255, 0.1)',
angle: -25,
animationDuration: 5
}
},
font: {
family: 'Poppins',
weight: 600,
style: 'normal'
},
icon: {
name: 'mic-off-outline',
size: 50,
color: '#ff3b30',
glowColor: 'rgba(255, 59, 48, 0.9)',
glowSize: 8,
marginRight: 12,
pulseColor: 'rgba(255, 59, 48, 0.25)',
pulseSize: {
base: 60,
expanded: 90
},
pulseSpeed: 2
},
text: {
color: 'white',
size: 14,
fontWeight: 600,
letterSpacing: '0.5px',
textShadow: '0 2px 3px rgba(0, 0, 0, 0.5)',
uppercase: true
},
animation: {
type: 'slide',
direction: 'bottom',
duration: 300,
easing: 'ease'
}
}
Voice Warning
voiceWarning: {
font: {
family: 'Poppins',
titleWeight: 700,
messageWeight: 500,
style: 'normal'
},
background: {
gradient: {
startColor: 'rgba(70, 70, 70, 0.8)',
endColor: 'rgba(50, 50, 50, 0.8)',
angle: '135deg'
},
shadow: {
primarySize: '150px',
primarySpread: '40px',
primaryOpacity: 0.85,
secondarySize: '80px',
secondarySpread: '20px',
secondaryOpacity: 0.65
}
},
icon: {
size: 120,
color: '#ff3b30',
glowColor: 'rgba(255, 59, 48, 0.9)',
glowSize: {
min: 25,
max: 55
},
pulseSize: {
base: 150,
expanded: 175
},
pulseSpeed: 2,
glowSpeed: 2
},
text: {
title: {
size: 28,
color: '#ff3b30',
glowColor: 'rgba(255, 59, 48, 0.9)',
glowSize: '35px',
shadowColor: 'rgba(0, 0, 0, 0.7)',
letterSpacing: '1px',
singleLine: true
},
message: {
size: 20,
color: 'white',
opacity: 0.9,
letterSpacing: '0.5px',
maxWidth: 350
},
spacing: 55
}
}
WebGL Configuration
const WebGLConfig = {
renderResolution: 0.5,
blurStrength: 10,
glassColor: 'rgba(255, 255, 255, 0.1)',
vertexShaderSource: `
attribute vec2 position;
varying vec2 vUv;
void main() {
vUv = 0.5 * (position + 1.0);
gl_Position = vec4(position, 0, 1);
}
`,
fragmentShaderSource: `
precision mediump float;
uniform sampler2D uTexture;
uniform vec2 uResolution;
uniform float uBlurStrength;
varying vec2 vUv;
void main() {
vec2 texelSize = 1.0 / uResolution;
float blurSize = uBlurStrength;
vec4 sum = vec4(0.0);
for (float x = -4.0; x <= 4.0; x++) {
for (float y = -4.0; y <= 4.0; y++) {
vec2 offset = vec2(x, y) * texelSize * blurSize;
sum += texture2D(uTexture, vUv + offset);
}
}
gl_FragColor = sum / 81.0;
}
`,
debug: false
};
window.WebGLConfig = WebGLConfig;
Last updated