Skip to main content
Config = {}
Config.Locale = 'en' -- The language of the script

-- [General Settings]
Config.Debug = false -- Enable debug prints
Config.CheckUpdate = true -- Check for resource updates
Config.AutoDuty = true -- Automatically set staff on duty (Please keep this option to)
Config.AutoDeleteInterval = "instant" -- Auto-delete closed reports after interval. Options: "instant", "30m", "1h", "6h"
Config.MaxReports = 2 -- Maximum number of open (pending/claimed) reports a player can have at once (1-10)

-- [High Report Warning]
-- Show a warning message to players when there are too many open reports
Config.HighReportWarning = {
    Enabled = true,
    Threshold = 5, -- Number of open (pending/claimed) reports before the warning shows
    Message = "Response times may be slower than usual due to a high volume of reports.",
}

-- [UI Configuration]
Config.UI = {
    title = "MS REPORTS", -- Server Name displayed in header
    logo = "https://r2.fivemanage.com/F1CcPxFgUPdI3mHDm0cff/ms-new.png", -- URL to logo image (top left)
    accentColor = "#1A98FF", -- Hex color for highlights (buttons, icons)
}

-- [Staff Insights Settings]
Config.StaffInsights = {
    ResetEnabled = true,          -- Enable/disable automatic reset of ticket counts
    ResetInterval = "1_week",     -- Options: "1_week", "2_weeks", "1_month"
}

-- [Command Settings]
Config.Commands = {
    OpenReport = {
        enabled = true,
        command = "report", -- Set your own command here
        description = "Open and create a report for the staff to view",
    },
    OpenAdmin = {
        enabled = true,
        command = "reports", -- Set your own command here
        description = "Open and view all reports and manage them",
        restricted = false -- Set to true to use Ace permissions (if not using Discord roles)
    }
}

-- [Framework Settings]
-- Options: "qbcore", "esx", "qbox", "standalone"
Config.Framework = "qbcore"

-- [Ambulance System]
-- Options: "qb-ambulancejob", "wasabi_ambulance", "esx_ambulancejob", "qbx_medical"
-- This determines which revive/kill events are used for the Revive/Kill Player actions
Config.AmbulanceSystem = "qb-ambulancejob"

-- [Appearance System]
-- Options: "illenium-appearance", "qb-clothing", "fivem-appearance"
-- This determines which clothing menu event is used for the Clothing Menu action
Config.AppearanceSystem = "illenium-appearance"

-- [Permission Settings]
-- Set to true to allow Ace permissions as a fallback if Discord roles are not found
Config.UseAcePermissions = false

-- [SQL Settings]
-- Options: "oxmysql", "mysql-async", "ghmattimysql"
Config.Database = "oxmysql"

-- [Report Types]
-- Define the types of reports players can submit
-- Each type has a label (displayed name) and color (hex)
Config.ReportTypes = {
    { label = "Player Report", color = "#ef4444" },
    { label = "Bug", color = "#f97316" },
    { label = "Help", color = "#3b82f6" },
    { label = "Other", color = "#a855f7" },
    { label = "Donations", color = "#55f799" },
    { label = "Applications", color = "#ffd891" },
    { label = "Gang Management", color = "#ff39ee" },
    { label = "Giveaway Winner", color = "#39f8ff" },
}

-- [Teleport Locations]
-- Pre-defined locations for quick teleport actions
Config.TeleportLocations = {
    { label = "Legion Square", coords = vector3(234.56, -889.12, 30.49) },
    { label = "Sandy Shores", coords = vector3(1848.12, 3690.34, 34.27) },
    { label = "Paleto Bay", coords = vector3(-135.67, 6345.89, 31.45) },
    { label = "Pillbox Hospital", coords = vector3(298.12, -584.34, 43.27) },
    { label = "MRPD", coords = vector3(425.12, -979.56, 30.71) },
    { label = "Admin Jail", coords = vector3(1642.12, 2570.34, 45.56) },
}

-- [Keyword Links]
-- Define words that will be highlighted and clickable in chat messages
-- Each entry has: keyword (the word to match), url (where it links to), icon (Iconify icon name), color (hex color)
Config.KeywordLinks = {
    { keyword = "discord", url = "https://discord.gg/motionstudios", icon = "ic:baseline-discord", color = "#5865F2" },
    { keyword = "documentation", url = "https://docs.motionstudios.com", icon = "mdi:book-open-page-variant", color = "#10b981" },
}

-- [Auto Replies]
-- Quick canned responses for staff to use
Config.AutoReplies = {
    "Test",
    "Please provide more details about the issue.",
    "Do you have any video evidence?",
    "This issue has been resolved.",
    "Please join the support channel on Discord.",
    "We are currently investigating, please hold.",
}

-- [Custom Actions]
-- Each action has a label, icon (Lucide icon name), and handler function
-- handler receives (targetId, staffId) as arguments
Config.CustomActions = {
    {
        label = "Clothing Menu",
        icon = "Shirt",
        handler = function(targetId, staffId)
            local appearance = Config.AppearanceSystem
            if appearance == "illenium-appearance" then
                TriggerClientEvent("illenium-appearance:client:openClothingShopMenu", targetId)
            elseif appearance == "qb-clothing" then
                TriggerClientEvent("qb-clothing:client:openMenu", targetId)
            elseif appearance == "fivem-appearance" then
                TriggerClientEvent("msReports_Refactor:client:openFivemAppearance", targetId)
            end
        end
    },
    {
        label = "Kill Player",
        icon = "Skull",
        handler = function(targetId, staffId)
            local ambulance = Config.AmbulanceSystem
            if ambulance == "qb-ambulancejob" then
                TriggerClientEvent('hospital:client:KillPlayer', targetId)
            elseif ambulance == "wasabi_ambulance" then
                TriggerClientEvent('hospital:client:KillPlayer', targetId)
            elseif ambulance == "esx_ambulancejob" then
                TriggerClientEvent('esx:onPlayerDeath', targetId)
            elseif ambulance == "qbx_medical" then
                TriggerClientEvent('msReports_Refactor:client:killPlayer', targetId)
            end
        end
    },
}
All files below are open source and able to be edited and changed
-- ============================================================
-- HOW TO ADD A NEW ACTION:
--
-- 1. Copy the template below and paste it at the bottom of this file.
-- 2. Replace "yourActionName" with a unique name for your action.
-- 3. Add your code inside the function body.
-- 4. In the UI (web/), add a button that triggers this event via NUI callback
--    using the event name: "msReports_Refactor:client:yourActionName"
--
-- TEMPLATE:
--   RegisterNetEvent("msReports_Refactor:client:yourActionName")
--   AddEventHandler("msReports_Refactor:client:yourActionName", function()
--       -- Your code here
--   end)
-- ============================================================

-- Opens the fivem-appearance character customization menu on the target player
RegisterNetEvent("msReports_Refactor:client:openFivemAppearance")
AddEventHandler("msReports_Refactor:client:openFivemAppearance", function()
    exports['fivem-appearance']:startPlayerCustomization()
end)

-- Kills the target player by setting their health to 0
RegisterNetEvent("msReports_Refactor:client:killPlayer")
AddEventHandler("msReports_Refactor:client:killPlayer", function()
    SetEntityHealth(PlayerPedId(), 0)
end)

UI Photos & In-Game

Image
Image
Image
Image
Image
Image
Image
Image