In-Game Configuration - Report Menu

If you are stuck, or run into problems. Just go over this and make sure you didn't do anything wrong.

The configuration for the report menu is pretty straightforward.

Example Config:

minutes = 60000 -- DO NOT CHANGE THIS VALUE
--[[
    To open the menu, use /reports.

    To create a report, use /report
]]
CONFIG = {
    DEBUG = false, -- If you want to see debug messages, set this to true.
    URL = 'https://store.hamz.dev/', -- Panel Link, with a "/" at the end of the link
    SERVER = 'YOUR SERVER NAME', -- Server name, this is the same name you entered on the panel
    TOKEN = 'YOUR SECRET KEY', -- Same token/secretkey from the config.php
    DISCORD_IMAGE = '', -- Discord image
    LOGS = {
        WEBHOOK = 'https://discord.com/api/webhooks/1234567890/abcdefghijklmnopqrstuvwxyz1234567890' -- Log for actions within the report menu
    },
    REPORT_COOLDOWN = 2 * minutes, -- How long till a player can create another report
    PERMISSIONS = {
        TYPE = 'DISCORD', -- 'DISCORD' or 'ACE'
        ACE = {
            VIEW_REPORTS = 'hamzstaff.viewreports',
            USE_PLAYER_ACTIONS = 'hamzstaff.useplayeractions',
            USE_REPORT_ACTIONS = 'hamzstaff.usereportactions'
        },
        DISCORD = {
            DISCORD_RESOURCE_NAME = 'Badger_Discord_API',
            VIEW_REPORTS = {
                '1125449225069666377'
            },
            USE_PLAYER_ACTIONS = {
                '1125449225069666377'
            },
            USE_REPORT_ACTIONS = {
                '1125449225069666377'
            }
        }
    }
}

Things to be aware of

Below are some things you need to know while configuring the Report Menu. The configuration is straightforward, but you must be mindful of a few things.

Debug

Set this to true if you are running into issues, that'll help you find exactly what's happening and what might be causing your problem.

URL

Make sure it begins with a "https://" and ends in a "/". SSL is required.

Server Name

This must be the same name as the one set in your config.php. It must be identical. The panel supports multiple servers, so ensure you put in the right one.

Example:

If you have this in your config.php:

'server_name' => 'Menu Server',

Then your server name would be this in your config.lua:

SERVER = 'Menu Server',

Webhook logs

This logs most stuff done within the reports menu

Report Cooldown

This states how many minutes it takes before a user can create another report. If you do not want this feature, simply do this:

REPORT_COOLDOWN = 0 * minutes,

Permissions

Discord Permissions are based on Discord roles and rely on Badger_Discord_API or any other script with the same exports.

Ace permissions work like this:

add_ace group.admin hamzstaff.viewreports allow
add_ace group.staff hamzstaff.viewreports allow
add_ace group.moderator hamzstaff.viewreports allow

add_ace group.admin hamzstaff.useplayeractions allow
add_ace group.staff hamzstaff.useplayeractions allow
add_ace group.moderator hamzstaff.useplayeractions allow

add_ace group.admin hamzstaff.usereportactions allow
add_ace group.staff hamzstaff.usereportactions allow
add_ace group.moderator hamzstaff.usereportactions allow

If you have a large player base, you might get rate limited by Discord, which will prevent users from accessing the Report/Staff Menu.

Discord Resource Name

Case-sensitive. Note not every discord permissions script will work, only the ones that have the same exports as Badger_Discord_API. If you do not know if your discord permissions script has those exports, just download Badger's resource:

If you want to remove the annoying ad's, simply remove this from the server.lua in Badger's resource:

RegisterNetEvent('Badger_Discord_API:PlayerLoaded')
AddEventHandler('Badger_Discord_API:PlayerLoaded', function()
	if (GetCurrentResourceName() ~= "Badger_Discord_API") then 
		TriggerClientEvent('chatMessage', -1, '^1[^5SCRIPT ERROR^1] ^3The script ^1' .. GetCurrentResourceName() .. ' ^3will not work properly... You must '
	.. 'rename the resource to ^1Badger_Discord_API');
	end
	local license = GetIdentifier(source, 'license');
	if (tracked[license] == nil) then 
		tracked[license] = true;
		TriggerClientEvent('chatMessage', source, 
		'^1[^5Badger_Discord_API^1] ^3The Discord API script was created by Badger. You may join his Discord at: ^6discord.gg/WjB5VFz')
	end
	TriggerClientEvent('chatMessage', source, 
		'^7[^2Zap-Hosting^7] ^3Use code ^5TheWolfBadger-4765 ^3at checkout for ^220% ^3off of selected services. Visit ^5https://zap-hosting.com/badger ^3to get started!');
end)

Last updated