đConfigurables
In this page, you can see everything that can be configured/changed within this script.
Config files
--[[
BY RX Scripts Š rxscripts.xyz
--]]
Config = {}
Config.Locale = 'en'
Config.SaveInterval = 5 -- Minutes to save reports to database
Config.ToggleNotifications = true -- Allow toggling of report notifications like new opened, chat of claimed tickets (default = disabled)
Config.MaxReports = 5 -- Max reports a player can have open at once
Config.HideAdminName = false -- Hide admin name for players in their reports (chat, claimed & closed by etc)
Config.Categories = {
{
name = 'Report Player',
fields = {
{ label = 'ID of Reported Player', type = 'number', cols = 6, required = false, isReportedId = true },
{ label = 'Subject', type = 'text', cols = 6, required = true },
{ label = 'Detailed Report', type = 'textarea', cols = 12, required = true },
},
},
{
name = 'Report Bug',
fields = {
{ label = 'Subject', type = 'text', cols = 12, required = true },
{ label = 'Detailed Report', type = 'textarea', cols = 12, required = true },
},
},
{
name = 'Report Other',
fields = {
{ label = 'Subject', type = 'text', cols = 12, required = true },
{ label = 'Detailed Report', type = 'textarea', cols = 12, required = true },
},
},
}
Config.StaffActions = { -- For each action, a function needs to be made in config/sv_config.lua: Config.ActionsFunctions
{
name = 'heal',
label = 'Heal',
severity = 'success', -- Possibilities: 'primary' | 'secondary' | 'success' | 'info' | 'warn' | 'danger' | 'contrast'
toReporter = true, -- Enable action to execute on the reporter
toReported = false, -- Enable action to execute on the reported player (in case there is any)
},
{
name = 'spectate',
label = 'Spectate',
severity = 'info',
toReporter = true, -- Enable action to execute on the reporter
toReported = true, -- Enable action to execute on the reported player (in case there is any)
},
{
name = 'goto',
label = 'Go To',
severity = 'info',
toReporter = true, -- Enable action to execute on the reporter
toReported = true, -- Enable action to execute on the reported player (in case there is any)
},
{
name = 'bring',
label = 'Bring',
severity = 'info',
toReporter = true, -- Enable action to execute on the reporter
toReported = true, -- Enable action to execute on the reported player (in case there is any)
},
{
name = 'tpback',
label = 'TP Back',
severity = 'info',
toReporter = true, -- Enable action to execute on the reporter
toReported = true, -- Enable action to execute on the reported player (in case there is any)
},
{
name = 'customExample',
label = 'Create Custom Action',
severity = 'contrast',
toReporter = true, -- Enable action to execute on the reporter
toReported = true, -- Enable action to execute on the reported player (in case there is any)
}
}
Config.Priorities = {
{
name = 'Low',
severity = 'info', -- Possibilities: 'primary' | 'secondary' | 'success' | 'info' | 'warn' | 'danger' | 'contrast'
playerAllowed = true, -- Allow players to set this priority themselves upon creating a report
},
{
name = 'Medium',
severity = 'warn',
playerAllowed = true,
},
{
name = 'High',
severity = 'danger',
playerAllowed = false,
}
}
Config.QuickResponses = {
{
label = 'More Info',
text = 'We have reviewed your report, and decided we need more information in order to work on this matter. Please respond with extra information.'
},
}
Config.BlacklistedWords = { -- Reports cannot include any of these words
'fuck',
}
Config.Commands = {
reportPanel = 'report', -- /report | Report a player, bug or other, and see your reports
staffPanel = 'reports', -- /reports | Open the reports staff panel
toggleNotifications = 'reportnotify', -- /reportnotify | Toggle incoming report notifications
}
Config.Keybinds = {
reportPanel = 'F6', -- Opens Report Panel
staffPanel = 'F7', -- Opens Reports Staff Panel
}
--[[
YOU CAN USE ACE PERMISSIONS TO ALLOW CERTAIN PLAYERS/GROUPS TO ACCESS THE REPORTS PANEL
EXAMPLE:
add_ace group.admin reports allow
add_ace identifier.fivem:1432744 reports allow #Rejox
OR YOU CAN USE THE STAFF GROUPS BELOW
--]]
Config.StaffGroups = {
'superadmin',
'admin',
'god',
'mod',
}
--[[
ONLY CHANGE THIS PART IF YOU HAVE RENAMED SCRIPTS SUCH AS FRAMEWORK, TARGET, INVENTORY ETC
RENAME THE SCRIPT NAME TO THE NEW NAME
--]]
---@type table Only change these if you have changed the name of a resource
Resources = {
FM = { name = 'fmLib', export = 'new' },
SCREENBASIC = { name = 'screenshot-basic', export = 'all' },
}
IgnoreScriptFoundLogs = false
--[[
BY RX Scripts Š rxscripts.xyz
--]]
Config.DiscordWebhooks = { -- Make sure the name is the same name as in the categories table
['Report Player'] = '',
['Report Bug'] = '',
['Report Other'] = '',
}
--[[
SERVER-SIDED ACTIONS
Please, do not create actions when you have no idea what is going on.
In our discord, we got a customer section where you can ask for help or search for action snippets.
--]]
Config.ActionsFunctions = { -- Make sure the name is the same name as in the staff actions table
['heal'] = function (reportId, staffId, toPlayerId, isReported)
local staff = FM.player.get(staffId)
if not staff then return end
-- Event below is put in client/opensource.lua, to make it more readable
TriggerClientEvent('rxreports:healPlayer', toPlayerId)
staff.notify(string.format('Successfully healed player (%s)', toPlayerId), 'success')
end,
['spectate'] = function (reportId, staffId, toPlayerId, isReported)
local staff = FM.player.get(staffId)
if not staff then return end
-- Event below is put in client/opensource.lua, to make it more readable
TriggerClientEvent('rxreports:spectatePlayer', staffId, toPlayerId)
staff.notify(string.format('Successfully spectating player (%s)', toPlayerId), 'success')
end,
['goto'] = function (reportId, staffId, toPlayerId, isReported)
local staff = FM.player.get(staffId)
if not staff then return end
-- Function below is put in server/opensource.lua, to make it more readable
if not GoToPlayer(staffId, toPlayerId) then return false end
staff.notify(string.format('Successfully teleported to player (%s)', toPlayerId), 'success')
end,
['bring'] = function (reportId, staffId, toPlayerId, isReported)
local staff = FM.player.get(staffId)
if not staff then return end
local report = GetReportById(reportId)
if not report then return false end
local oldCoords = GetEntityCoords(GetPlayerPed(toPlayerId))
-- Function below is put in server/opensource.lua, to make it more readable
if not BringPlayer(staffId, toPlayerId) then return false end
if isReported then
report.oldReportedCoords = oldCoords
else
report.oldReporterCoords = oldCoords
end
staff.notify(string.format('Successfully brought player (%s)', toPlayerId), 'success')
end,
['tpback'] = function (reportId, staffId, toPlayerId, isReported)
local staff = FM.player.get(staffId)
if not staff then return end
local report = GetReportById(reportId)
if not report then return false end
local backCoords = isReported and report.oldReportedCoords or report.oldReporterCoords
if not backCoords then
staff.notify('Player has no previous location to teleport back to', 'error')
return false
end
-- Function below is put in server/opensource.lua, to make it more readable
if not TeleportPlayer(toPlayerId, backCoords) then return false end
staff.notify(string.format('Successfully teleported player (%s) back', toPlayerId), 'success')
end,
['customExample'] = function (reportId, staffId, toPlayerId, isReported)
Success('Look in server console, this is a custom example action')
Success('Executed by Staff Player ID: ' .. staffId)
Success('Used on Player ID: ' .. toPlayerId)
end,
}
--[[
API KEY (https://fivemanage.com/)
DO NOT SHARE THIS WITH ANYONE, EVER!
REQUIRES: screenshot-basic (https://github.com/citizenfx/screenshot-basic)
--]]
Config.FIVEMANAGE_API_KEY = ''
Opensource files
--[[
BY RX Scripts Š rxscripts.xyz
--]]
RegisterNetEvent('rxreports:healPlayer', function()
local playerPed = PlayerPedId()
local coords = GetEntityCoords(playerPed)
local heading = GetEntityHeading(playerPed)
NetworkResurrectLocalPlayer(coords.x, coords.y, coords.z, heading, true, false)
ClearPedBloodDamage(playerPed)
ClearPedTasksImmediately(playerPed)
SetEntityHealth(playerPed, GetEntityMaxHealth(playerPed))
SetPlayerSprint(PlayerId(), true)
ResetPedMovementClipset(playerPed, 0.0)
end)
RegisterNetEvent('rxreports:spectatePlayer', function(spectateId)
-- One of these is correct depending on your txAdmin version
TriggerServerEvent('txsv:req:spectate:start', spectateId)
TriggerServerEvent('txAdmin:menu:spectatePlayer', spectateId)
end)
--[[
BY RX Scripts Š rxscripts.xyz
--]]
function BringPlayer(staffId, reporterId)
local c = GetEntityCoords(GetPlayerPed(staffId))
SetEntityCoords(GetPlayerPed(reporterId), c)
return true
end
function GoToPlayer(staffId, reporterId)
local c = GetEntityCoords(GetPlayerPed(reporterId))
SetEntityCoords(GetPlayerPed(staffId), c)
return true
end
function TeleportPlayer(reporterId, coords)
SetEntityCoords(GetPlayerPed(reporterId), coords)
return true
end
Last updated