ensure qb-core # or qbox / esx (choose only one)
ensure ox_lib # only if using ox_lib notifications
ensure mythic_notify # only if using mythic_notify
ensure okokNotify # only if using okokNotify
ensure lx-radar
Config = {}
--------------------------------------------------------------------------------
-- 👮 Allowed Jobs
--------------------------------------------------------------------------------
Config.AllowedJobs = {
police = true,
lspd = true,
bcso = true,
sahp = true
}
--------------------------------------------------------------------------------
-- 🚓 Vehicle Restrictions
--------------------------------------------------------------------------------
-- Require police-class vehicle (class 18) to use radar?
Config.RequirePoliceVehicle = true
--------------------------------------------------------------------------------
-- 🔒 Plate Locking Keys
--------------------------------------------------------------------------------
Config.PlateLockKey = "J" -- Lock front plate
Config.RearPlateLockKey = "K" -- Lock rear plate
--------------------------------------------------------------------------------
-- 🔔 Notification System
--------------------------------------------------------------------------------
-- Options: "ox_lib", "mythic_notify", "okokNotify"
Config.NotifySystem = "ox_lib"
--------------------------------------------------------------------------------
-- 📺 Radar Display Controls
--------------------------------------------------------------------------------
Config.Radar = {
command = {
active = true,
name = "polradar" -- Type /polradar to toggle
},
key = {
active = true,
name = "F10" -- Press F10 to toggle
},
event = {
active = true,
name = "lx:radar:Toggle" -- Trigger from other scripts
},
cursor = {
command = {
active = false,
name = "RadarCursor" -- Command to open UI focus (if enabled)
},
key = {
active = true,
key = 36 -- CTRL
}
}
}
--------------------------------------------------------------------------------
-- 📤 Discord Logging
--------------------------------------------------------------------------------
Config.EnableDiscordLogging = true
Config.DiscordWebhook = "https://discord.com/api/webhooks/REPLACE_WITH_YOUR_URL"
Config.DiscordBotName = "Radar Bot"
Config.DiscordAvatar = "https://cdn.discordapp.com/attachments/1147914942637424752/1392040964788584468/new_lx_scripts_logo.png"
--------------------------------------------------------------------------------
-- 🔔 Notification Function (auto-select based on Config.NotifySystem)
--------------------------------------------------------------------------------
Config.Notify = function(msg)
if Config.NotifySystem == "ox_lib" then
if exports and exports.ox_lib then
exports.ox_lib:notify({
title = "Radar",
description = msg,
type = "info",
duration = 5000
})
end
elseif Config.NotifySystem == "mythic_notify" then
if exports and exports["mythic_notify"] then
exports["mythic_notify"]:DoHudText("inform", msg, 5000)
end
elseif Config.NotifySystem == "okokNotify" then
if exports and exports["okokNotify"] then
exports['okokNotify']:Alert('Notification', msg, 5000, 'info', true)
end
end
end