Reports (ed_reports)
Advanced report system.
Installation
Download the Script
Download the script using keymaster.
Add it to your resources
Open the downloaded zip, copy ed_reports
& put it inside your resources.
Start the Script
Terminal
refresh
start ed_reports
Finally, if everything is right, you can put it inside your server.cfg
as follows:
server.cfg
ensure ed_reports
Install screenshot-basic (optional)
screenshot-basic is needed for screenshots to work.
If you decide to install it, you do not need to change anything. Script will automatically detect its existence.
Well done! You can now enjoy your new script.
You are free to change the resource name.
Configuration
config.lua
config_server.lua
translations.lua
-- https://edeverce.com/scripts/reports
Config = {
---@type "default"|"blue"|"green"|"red"|"rose"|"orange"|"violet"|"yellow"
-- UI theme. See https://edeverce.com/guides/theming for more advanced configuration.
theme = "default",
---@type string
-- Shorthand for myReports command, it displays submit dialog immediately for faster report submission.
reportCommand = "report",
---@type string
-- Command to display players previous reports.
myReportsCommand = "myreports",
---@type string
-- Command for staff to display reports dashboard.
reportsCommand = "reports",
---@type number
-- Cooldown (ms) of sending chat messages.
chatCooldown = 1500,
---@type string[]
-- Categories to display.
categories = { "Question", "Bug", "Player" },
---@type boolean
-- Determines whether to use built-in notification system or not.
handleNotifications = true,
---@type fun(type: string, title: string, description: string)
-- If handleNotifications set to false, this function will be called.
notificationHandler = function(type, title, description)
--ESX
/*
ESX = exports["es_extended"]:getSharedObject()
ESX.ShowNotification(title .. " / " .. description, type)
*/
--QB
--TriggerEvent("QBCore:Notify", { text = title, caption = description })
end,
---@type number
-- Limited amount of reports handled by a staff at a time.
acceptedReportLimit = 3,
---@type boolean
-- Determines whether to take screenshot when a player submits a report.
screenshotOnSubmit = true
}
-- https://edeverce.com/scripts/reports
ServerConfig = {
---@type string?
-- Discord webhook url to send logs to.
discordWebhook = "",
---@type string?
-- Title of discord embed. Defaults to resource name.
discordWebhookTitle = nil,
---@type number?
-- Color of discord embed.
discordWebhookColor = 16727040,
---@type { identifier: string, name: string, role: string, avatar?: string, canAccessLogs?: boolean, canAccessSettings?: boolean }[]
-- Array of players that can access to reports dashboard.
staff = {
{
identifier = "license:xxxxx",
name = "John Doe",
role = "MODERATOR",
canAccessLogs = true,
canAccessSettings = true,
}
}
}
Translations = {
overview = "Overview",
overview_all_time = "All Time",
overview_this_month = "This Month",
overview_this_week = "This Week",
overview_leading = "Leading Staff Member",
overview_by_all = "by all staff members",
overview_statistics = "Statistics",
overview_statistics_description = "Resolved / Rejected reports over months.",
overview_statistics_month_1 = "Jan",
overview_statistics_month_2 = "Feb",
overview_statistics_month_3 = "Mar",
overview_statistics_month_4 = "Apr",
overview_statistics_month_5 = "May",
overview_statistics_month_6 = "Jun",
overview_statistics_month_7 = "Jul",
overview_statistics_month_8 = "Aug",
overview_statistics_month_9 = "Sep",
overview_statistics_month_10 = "Oct",
overview_statistics_month_11 = "Nov",
overview_statistics_month_12 = "Dec",
overview_leaderboard = "Leaderboard",
overview_leaderboard_description = "Top staff members.",
reports = "Reports",
reports_filter = "Filter",
reports_filter_reset = "Reset",
reports_filter_handled_by_me = "Handled by me",
reports_select_a_report = "Select a report.",
your_reports = "Your Reports",
report_status_pending = "Pending",
report_status_in_progress = "In Progress",
report_status_resolved = "Resolved",
report_status_rejected = "Rejected",
report_status_cancelled = "Cancelled",
report_accept = "Accept Report",
report_resolve = "Resolve Report",
report_actions = "Actions",
report_actions_reporter = "Reporter",
report_actions_nearby_players = "Nearby Players",
report_actions_license = "License",
report_actions_server_id = "Server ID",
report_actions_discord_id = "Discord ID",
report_actions_steam_id = "Steam ID",
report_actions_coordinates = "Coordinates",
report_actions_goto = "Goto",
report_actions_bring = "Bring",
report_actions_spectate = "Spectate",
report_event_submit = "%s has submitted the report.",
report_event_cancel = "%s has cancelled the report.",
report_event_feedback = "%s has left a feedback.",
report_event_accept = "%s has accepted the report.",
report_event_reject = "%s has rejected the report.",
report_event_resolve = "%s has resolved the report.",
staff = "Staff",
staff_previous = "Previous",
staff_next = "Next",
staff_select_a_member = "Select a member.",
staff_no_feedback_yet = "No feedback yet.",
staff_placeholder = "Ex Staff",
chat = "Chat",
chat_online_staff = "Online Staff",
logs = "Logs",
settings = "Settings",
settings_report_submission = "Report Submission",
settings_report_submission_description = "Toggle report submission.",
settings_report_submission_enable = "Enable",
settings_report_submission_disable = "Disable",
settings_report_submission_status = "Status",
settings_report_submission_status_enabled = "Enabled",
settings_report_submission_status_disabled = "Disabled",
settings_report_submission_message = "Message",
settings_danger_zone = "Danger Zone",
settings_danger_zone_description = "Set of actions that cant be reverted.",
settings_danger_zone_delete_resolved_reports = "Delete Resolved Reports",
settings_danger_zone_delete_rejected_reports = "Delete Rejected Reports",
settings_danger_zone_delete_cancelled_reports = "Delete Cancelled Reports",
settings_event_report_submission_enabled = "%s has enabled the report submission.",
settings_event_report_submission_disabled = "%s has disabled the report submission.",
settings_event_delete_resolved_reports = "%s has deleted %s resolved reports.",
settings_event_delete_rejected_reports = "%s has deleted %s rejected reports.",
settings_event_delete_cancelled_reports = "%s has deleted %s cancelled reports.",
dialog_submit_report = "Submit Report",
dialog_submit_report_description = "File a new report.",
dialog_submit_report_disabled = "Report submissions are disabled.",
dialog_cancel_report = "Cancel Report",
dialog_cancel_report_description = "You are about to cancel this report. Are you sure?",
dialog_reject_report = "Reject Report",
dialog_reject_report_description = "You are about to reject this report. This action can not be undone.",
dialog_delete_resolved_reports = "Delete Resolved Reports",
dialog_delete_resolved_reports_description =
"You are about to delete resolved reports. This action will delete all resolved reports, related logs, messages and screenshots.",
dialog_delete_rejected_reports = "Delete Rejected Reports",
dialog_delete_rejected_reports_description =
"You are about to delete rejected reports. This action will delete all rejected reports, related logs, messages and screenshots.",
dialog_delete_cancelled_reports = "Delete Cancelled Reports",
dialog_delete_cancelled_reports_description =
"You are about to delete cancelled reports. This action will delete all cancelled reports, related logs, messages and screenshots.",
dialog_disable_report_submission = "Disable Report Submission",
dialog_disable_report_submission_description = "Disable report submission with a custom message.",
dialog_feedback = "Leave a Feedback",
dialog_feedback_description = "Leave a feedback to the staff of your report.",
field_reason = "Reason",
field_reason_placeholder = "Type reason here...",
field_reason_error_min = "Reason must be atleast 3 characters.",
field_reason_error_max = "Reason must be at most 128 characters.",
field_message = "Message (optional)",
field_message_placeholder = "Type message here...",
field_message_error_min = "Message must be atleast 3 characters.",
field_message_error_max = "Message must be at most 128 characters.",
field_category = "Category",
field_category_dropdown_label = "Categories",
field_category_placeholder = "Select a category",
field_category_error_required = "Category is required.",
field_subject = "Subject",
field_subject_placeholder = "Type subject here...",
field_subject_error_required = "Subject is required.",
field_subject_error_min = "Subject must be atleast 3 characters.",
field_subject_error_max = "Subject must be at most 128 characters.",
field_description = "Description",
field_description_placeholder = "Type description here...",
field_description_error_required = "Description is required.",
field_description_error_min = "Description must be atleast 3 characters.",
field_description_error_max = "Description must be at most 256 characters.",
field_rating = "Rating",
field_feedback = "Feedback",
field_feedback_placeholder = "Type feedback here...",
field_feedback_error_min = "Feedback must be atleast 3 characters.",
field_feedback_error_max = "Feedback must be at most 256 characters.",
notifications = "Notifications",
notifications_everything = "Everything",
notifications_essential = "Essential",
notifications_ignore = "Ignore",
notification_staff_chat = "Staff Chat",
notification_printed_to_console = "Printed to console.",
notification_player_offline = "Player is offline.",
notification_player_offline_description = "Selected player is offline.",
notification_new_report = "New Report",
notification_report = "Report #%s",
notification_report_message = "%s has sent a message.",
notification_report_screenshot = "%s has sent a screenshot.",
}
Make sure to restart the script after changing one of these files.