![[QBCore|ESX] Military Goggles](/_next/image?url=https%3A%2F%2Fforum-cfx-re.akamaized.net%2Foriginal%2F5X%2Fa%2F7%2Fc%2Ff%2Fa7cfcc04ff79eea2d876379abbd72cf08f56fad5.webp&w=2048&q=75)
Config = {}
-- Framework Settings
Config.Framework = "QBCore" -- "ESX" or "QBCore"
Config.Notify = "ox" -- "qb", "ox", or "esx"
-- Item and clothing
Config.ItemName = "military_goggles" -- Item that activates the system
Config.NVClothing = {
used = 118, -- number of the nightvision goggles clothing in ur server
not_used = 0 -- number of hat to use after player finish with the goggles
}
-- Battery
Config.EnableBattery = true -- use Battery system
Config.BatteryItem = "mg_battery" -- item name
Config.BatteryDrainRate = 0.1 -- % per second
Config.BatteryRecharge = 100 -- reset to 100% when replaced
-- Who can use night vision
Config.useJobs = false -- if true add Allowed Jobs
Config.AllowedJobs = {
["police"] = true,
["army"] = true,
["swat"] = true,
}
-- Vision Modes
Config.CycleVisionModes = 'E' -- key to Cycle Vision Modes
Config.VisionModes = {
["NIGHTVISION"] = {
enable = function()
SetNightvision(true)
SetSeethrough(false)
-- add what u want here on "enable"
end,
disable = function()
SetNightvision(false)
-- add what u want here on "disable"
end,
label = "NIGHT VISION"
},
["THERMAL"] = {
enable = function()
SetSeethrough(true)
SetNightvision(false)
-- add what u want here
end,
disable = function()
SetSeethrough(false)
-- add what u want here
end,
label = "THERMAL VISION"
},
["FLASHLIGHT"] = {
enable = function()
SetNightvision(false)
SetSeethrough(false)
-- add what u want here
end,
disable = function()
-- add what u want here
end,
label = "FLASHLIGHT MODE"
}
}
-- flashlight
Config.Flashlight = {
light_distance = 50.0,
light_brightness = 5.0,
light_hardness = 12.0,
light_radius = 30.0,
light_falloff = 50.0,
attach_bone = 31086, -- head bone
}
-- Sound
Config.SoundVolume = 0.25
Config.SoundEnable = true -- need InteractSound resource
-- Animation
Config.UseAnimation = true
-- Progress bar
Config.ProgressbarTime = 1200
-- Translations
Config.Translate = {
-- Notifications
no_access = "You don't have access to night vision!",
battery_dead = "Battery dead! Replace it with a new battery.",
battery_replaced = "Night vision battery replaced!",
nvg_recharged = "Night vision recharged and operational!",
nvg_ready = "Battery replaced! Night vision is ready to use.",
replace_failed = "Failed to replace battery!",
battery_system_disabled = "Battery system is disabled.",
battery_still_charged = "Battery still has %s%% charge remaining.",
need_battery = "You need a night vision battery to replace the drained one!",
-- Vision Mode Notifications
mode_nightvision = "Night Vision Mode Activated",
mode_thermal = "Thermal Vision Mode Activated",
mode_flashlight = "Flashlight Mode Activated",
press_f_to_switch = "Press E to switch vision modes",
-- Progress Bar
progress_text = "Toggling Night Vision...",
-- UI Text
time_label = "TIME",
power_label = "POWER",
heading_label = "HEADING",
direction_label = "DIRECTION",
altitude_label = "ALTITUDE",
nvg_active = "NVG ACTIVE",
low_battery = "LOW BATTERY"
}
Preview :
Tebex :
https://sinorsystem.tebex.io/
| Code is accessible | n/a |
| Subscription-based | No |
| Lines (approximately) | 1000+ |
| Requirements | ox_lib |
| Support | Yes |