Installation
This section is for uploading images and screenshots from link, image or from ingame, you can find these in (shared/upload.lua). Here you need to insert either Fivemanage token or Discord webhook or Imgur Client ID or customize it yourself if you want the image uploading to work.
Upload = {}
Upload.FivemanageToken = "YOUR_FIVEMANAGE_TOKEN"
Upload.DiscordWebhookURL = "YOUR_DISCORD_WEBHOOK_URL"
Upload.ImgurClientID = "YOUR_IMGUR_CLIENT_ID"
Upload.screenshotQuality = 0.8 -- Use between 0.0 and 1.0
Upload.screenshotEncoding = 'png' -- Use 'jpg', 'png', or 'webp'
Upload.allowedImageEncoding = {'jpg', 'png', 'webp'}
Configuration file (config.lua)
Config = {}
Config.Framework = 'qb-core'-- "qb-core", "esx", "qbx", "standalone" or customize yourself | OBS!! if you use standalone or qbx you have to use our lib (https://jl-store.tebex.io/package/6508787).
Config.Staffs = { 'god', 'admin' }
Config.Notify = 'okok' -- "qb", "esx", "okok", "qbx", "qs" or customize it yourself.
Config.Language = "en"
Config.FormatDate = "sv-SE" -- https://www.w3schools.com/jsref/jsref_tolocalestring.asp
Config.Clothing = "qb-clothing" --"qb-clothing", "esx_skin", "none" or customize it yourself just by changing the event in server/custom/custom.lua, if set to none the clothing menu button will disappear.
Config.Upload = "fivemanage" -- "fivemanage" or "discord" or "imgur" (we recommed fivemanage, change your token in shared/upload.lua)
Config.Command = "reports"
-- What actions you want to enable or disable, you can customize all of them.
Config.Buttons = {
Bring = true,
Kick = true,
Ban = true,
Teleport = true,
Clothing = true,
}
Config.Notifys = {
created = true, -- Notify all Staff when a report is created?
message = true, -- Notify all Staff when a report is sent in a report?
}
Config.ReportCategories = {
{ name = "Criminal" },
{ name = "Civilian" },
{ name = "Bug Report" },
}
The database tables, insert these into your database.
CREATE TABLE IF NOT EXISTS `jl_reports_oldreports` (
`id` VARCHAR(255) PRIMARY KEY,
`image` VARCHAR(255),
`link` VARCHAR(255),
`screenshot` VARCHAR(255),
`title` VARCHAR(255),
`description` TEXT,
`type` VARCHAR(255),
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`player_identifier` VARCHAR(255),
`claimed` BOOLEAN DEFAULT FALSE,
`claimed_by` VARCHAR(255),
`player_info` TEXT
);
CREATE TABLE IF NOT EXISTS `jl_reports_statistics` (
`id` INT AUTO_INCREMENT PRIMARY KEY,
`identifier` VARCHAR(255) NOT NULL,
`admin_name` VARCHAR(255),
`claimed_reports` INT DEFAULT 0,
`closed_reports` INT DEFAULT 0,
`last_report_taken` TIMESTAMP,
UNIQUE KEY `identifier` (`identifier`)
);
CREATE TABLE IF NOT EXISTS `jl_reports_chat` (
`id` INT AUTO_INCREMENT PRIMARY KEY,
`report_id` VARCHAR(255),
`author` VARCHAR(255),
`message` TEXT,
`is_admin` BOOLEAN,
`timestamp` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
The translation file (locales/translations/en.lua). Translate these to your language.
Language["en"] = {
Reportsystem = {
copiedtoclipboard ="Copied to clipboard",
view = "View",
search = "Search",
all_reports = "All Reports",
unclaimed = "Unclaimed",
claimed = "Claimed",
no = "No",
yes = "Yes",
send = "Send",
select_a_type = "Select a type",
no_reports_available = "No reports available",
report_menu = "Report Menu",
adminstatistics = "Admin Statistics",
reports = "Reports",
old_reports = "Old Reports",
creator = "Creator",
type = "Type",
title = "Title",
claimed = "Claimed",
created_time = "Created Time",
action = "Action",
open = "Open",
create_report = "Create Report",
admin_name = "Staff",
claimed_reports = "Claimed Reports",
closed_reports = "Closed Reports",
last_report_taken = "Last Report Taken",
chat = "Chat",
type = "Type",
description = "Description",
player_information = "Player Information",
serverid = "Server ID",
username = "Username",
character_name = "Character Name",
identifier = "Identifier",
discord = "Discord",
claim_report = "Claim Report",
close_report = "Close Report",
kick_player = "Kick Player",
ban_player = "Ban Player",
teleport_to_player = "Teleport to Player",
give_clothing_menu = "Give Clothing Menu",
bring_player = "Bring Player",
create_report = "Create a report",
report_type = "Report Type",
title = "Title",
description = "Description",
attach_image = "Attach Image (Optional)",
attach_link = "Attach Link (Optional)",
screenshot = "Screenshot",
submit_report = "Submit Report",
title = "Title",
creator = "creator",
resolved_time = "Resolved Time",
action = "Action",
},
other = {
reportcreated = "Report Created",
reportnotfound = "Report not found.",
reportalreadyclaimed = "This report is already claimed by ",
hasclaimedreport = " has claimed the report.",
youclaimedreport = "You claimed the report.",
errorclaimingreport = "Error claiming the report.",
reportclosed = "Report closed and statistics updated.",
message = "New message in report",
},
}
Last updated