โEz Report Menu
A menu which allows admins to easily spawn items for players. This works for both fivem and redm and can be adjusted easily.
STEP 1 - Unzip and Add Script To Server
Unzip the script folder within your server resources folder. Ensure script in server.cfg ... "ensure ez_itemspawner".
STEP 2 - Script Configuration
The script has many features available.
Admin Checker
A function to check if player is allowed to view all reports, i.e. is an admin/ staff.
Standalone Version
Works for all frameworks. A standard way to give permissions using ace permissions.
Config.AdminChecker = function(source)
return IsPlayerAceAllowed(source, "ez_reports.staff")
end
You can then give group.admin
permission by giving them the ace permission in server.cfg
.
add_ace group.admin ez_reports.staff allow
VorpCore Version (Optional)
Make use of VORP's user table where a player can be given a group, e.g. admin, and be able to check if they are an admin.
Config.AdminChecker = function(source)
local StaffGroups = { -- Add groups which are allowed to see all reports
["superadmin"] = true,
["admin"] = true,
["helper"] = false,
}
if not Core then Core = exports.vorp_core:GetCore() end
local user = Core.getUser(source) -- Uses the group from user table. Not character table.
if not user then return false end
return StaffGroups[user.getGroup] or false
end
This is just an example. As you can see anyone who is admin or superadmin (not helper as set to false) is able to identify as an admin and see all reports.
Database Feature
The script saves reports even after a server restart. This option is optional. You are able to disable it.
You are able to toggle the option of deleting closed reports after each restart.
We recommend to keep tablechecker on at all times. It has to be on atleast once when running script for the first time, if database system enabled.
Config.Database = {
enabled = true, -- Set to false to disable database usage where it will not save reports and they will delete after server restart
tableChecker = true, -- Set to false to disable table checking, RECOMMENDED TO KEEP THIS TRUE
deleteClosedReportsAfterRestart = false, -- Set to false to keep closed reports in the database after server restart
}
Limit number of reports per player
You are able to limit the number of reports a player can have open. A player can have multiple of open and closed reports and can view them and message within the open reports. To avoid players from spamming reports, you have an option to set a limit.
Config.MaxReportsPerPlayer = 3
Read the config page for more help!
STEP 3 - Webhook Configuration
Webhook config located in server/webhook.lua
allows you to set the hooks to your channel.
Note: It is located in a separate file to avoid hackers obtaining it by keeping it on server-side.
Last updated
Was this helpful?