- config.lua
- server_config.lua
- discord.lua
Copy
Ask AI
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
},
}
Copy
Ask AI
ServerConfig = {}
ServerConfig.ScreenshotWebhook = ""
-- [Staff Roles]
-- Discord role IDs that have access to the admin panel
Config.StaffRoles = {
"", -- Developer
}
ServerConfig.Discord = {
BotToken = "",
GuildId = "",
-- Each role can have: label and color
-- Color is the hex color used for the role badge and avatar border in the Staff Online page
Roles = {
[""] = { label = "Developer", color = "#3b82f6" },
},
CacheRoles = true,
CacheTime = 300,
}
ServerConfig.Logging = {
Enabled = true,
Username = "MS Reports",
Avatar = "https://i.postimg.cc/C1LrZVKZ/image-removebg-preview-(1).png",
PingRole = {
Enabled = false,
RoleId = ""
},
-- [Event Webhooks]
-- Each event can be enabled/disabled and sent to its own Discord webhook
-- Set webhook to "" to disable that specific event
Events = {
ReportOpened = { enabled = true, webhook = "" },
ReportClosed = { enabled = true, webhook = "" },
ReportClaimed = { enabled = true, webhook = "" },
ReportChat = { enabled = true, webhook = "" },
},
Queue = {
Enabled = true,
Interval = 2000,
FlushOnShutdown = true
}
}
ServerConfig.Database = {
AutoInstall = true,
}
Copy
Ask AI
DiscordEmbeds = {
-- URL for a large image at the bottom of embeds (leave empty to disable)
Image = "",
-- Customize embeds per event type
-- Colors use hex strings (e.g. "#22c55e")
ReportOpened = {
color = "#22c55e", -- green
title = "\xF0\x9F\x93\x98 [ New Report: %s ]",
},
ReportClaimed = {
color = "#eab308", -- orange/yellow
title = "\xF0\x9F\x93\x99 [ Report Claimed: %s ]",
},
ReportClosed = {
color = "#ef4444", -- red
title = "\xF0\x9F\x93\x95 [ Report Concluded: %s ]",
},
ReportChat = {
color = "#f97316", -- orange
title = "\xF0\x9F\x9A\xA9 [ Chat Reported: %s ]",
},
-- Footer settings
Footer = {
Text = "MS Reports",
IconUrl = "", -- leave empty to disable footer icon
},
}
All files below are open source and able to be edited and changed
- cl_open.lua
- sv_open.lua
Copy
Ask AI
-- ============================================================
-- 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)
Copy
Ask AI
-- Helper: resolves a player name or id string into a valid server player id
local function GetPlayerId(target)
if type(target) == "number" then return target end
if tonumber(target) then return tonumber(target) end
if QBCore and QBCore.Functions then
local player = QBCore.Functions.GetPlayerByName(target)
if player then return player.PlayerData.source end
end
return nil
end
-- Teleports the staff member to the target player's location
RegisterNetEvent("msReports_Refactor:server:TeleportToPlayer")
AddEventHandler("msReports_Refactor:server:TeleportToPlayer", function(targetName)
local src = source
local targetId = GetPlayerId(targetName)
if targetId then
local ped = GetPlayerPed(src)
local targetPed = GetPlayerPed(targetId)
local coords = GetEntityCoords(targetPed)
SetEntityCoords(ped, coords.x, coords.y, coords.z + 1.0, false, false, false, true)
NotifyPlayer(targetId, "info", "Staff Teleported", "A staff member has teleported to you.", "mdi:map-marker", "#3b82f6")
else
NotifyPlayer(src, 'error', _L('player_not_found'), _L('teleport_error'), nil, nil)
end
end)
-- Brings the target player to the staff member's location
RegisterNetEvent("msReports_Refactor:server:BringPlayer")
AddEventHandler("msReports_Refactor:server:BringPlayer", function(targetName)
local src = source
local targetId = GetPlayerId(targetName)
if targetId then
local ped = GetPlayerPed(src)
local targetPed = GetPlayerPed(targetId)
local coords = GetEntityCoords(ped)
SetEntityCoords(targetPed, coords.x, coords.y, coords.z + 1.0, false, false, false, true)
NotifyPlayer(targetId, "info", "Teleported by Staff", "You have been brought to a staff member.", "mdi:swap-horizontal", "#3b82f6")
else
NotifyPlayer(src, 'error', _L('player_not_found'), _L('bring_error'), nil, nil)
end
end)
-- Revives the target player using the configured ambulance system (set in Config.AmbulanceSystem)
-- Supports: qb-ambulancejob, wasabi_ambulance, esx_ambulancejob, qbx_medical
RegisterNetEvent("msReports_Refactor:server:RevivePlayer")
AddEventHandler("msReports_Refactor:server:RevivePlayer", function(targetInput, adminSource)
local src = adminSource or source
local targetId = GetPlayerId(targetInput)
if targetId and GetPlayerName(targetId) then
local ambulance = Config.AmbulanceSystem
if ambulance == "qb-ambulancejob" then
TriggerClientEvent('hospital:client:Revive', targetId)
elseif ambulance == "wasabi_ambulance" then
exports.wasabi_ambulance:RevivePlayer(targetId)
elseif ambulance == "esx_ambulancejob" then
TriggerClientEvent('esx_ambulancejob:revive', targetId)
elseif ambulance == "qbx_medical" then
exports.qbx_medical:Revive(targetId)
end
local targetName = GetPlayerName(targetId)
local adminName = GetPlayerName(src)
NotifyPlayer(src, 'success', _L('revive_player'), _L('revive_player_desc', targetName), "mdi:heart-pulse", "#22c55e")
NotifyPlayer(targetId, 'info', _L('been_revived'), _L('been_revived_desc', adminName), "mdi:heart-pulse", "#3b82f6")
else
NotifyPlayer(src, 'error', _L('player_not_found'), _L('player_offline_desc'), "mdi:alert-circle", "#ef4444")
end
end)
UI Photos & In-Game







