Accessible files

Here you can find all the files which can be edite to make the asset compatible with your server.​

config.lua
Config = {
    Core = 'ESX',  -- ESX / QBCORE / STANDALONE  | Other core setting on the 'core' folder and the client and server utils.lua
    ReportMenu = {Command = 'report', CommandLabel = 'Use the command to open the Report Menu'},
    AdminMenu = {Command = 'reports', CommandLabel = 'Use the command to open the Report List'},
    AdminNotify = {Command = 'an', CommandLabel = 'Use the command to switch off/on the report admin notifys'},

    PlayerLoadedTime = 5000, -- in ms | 1000 = 1 sec (Only if the Core = STANDALONE)
    
    AdminGroups = {'superadmin', 'admin', 'mod'},  -- Only if the Core = ESX / QBCORE
    IdentifierPermission = false,  -- If Core = STANDALONE then this is in use

    Admins = {
        'discord:806082985861447691',
        'discord:692782027866636308',

        --[[ TYPES ]]--
        -- 'steam:123456789',
        -- 'license:123456789',
        -- 'fivem:123456789',
        -- 'ip:123456789',
        -- 'discord:123456789',
    },

    --[[ Add your Webhook in >> server-utils.lua ]]--
    Webhooks = {
        Locale = {
            ['NewReport'] = 'New Report',
            ['ClosedReport'] = 'Closed Report',

            ['Category'] = 'Category',
            ['Title'] = 'Title',
            ['Description'] = 'Description',
            ['Playerdetails'] = 'Player details',
            ['Admindetails'] = 'Admin details',
            ['ID'] = 'ID',
            ['Name'] = 'Name',
            ['Identifier'] = 'Identifier',
            ['Discord'] = 'Discord',

            ['Time'] = 'Time ⏲️'
        },
        -- To change a webhook color you need to set the decimal value of a color, you can use this website to do that - https://www.mathsisfun.com/hexadecimal-decimal-colors.html
        Colors = {
            ['newReport'] = 16776960, 
            ['closeReport'] = 16711680
        }
    },

    -----------------------------------------------------------
    -----------------------| TRANSLATE |-----------------------
    -----------------------------------------------------------

    NoneAdmin = 'None',
    Report = 'Report #',

    Notify = {
        [1] =  {'Brutal Reports', "An admin send you a Message!", 5000, 'info'},
        [2] =  {'Brutal Reports', "You don't have permission to use the Command!", 5000, 'error'},
        [3] =  {'Brutal Reports', "Your report has been closed!", 5000, 'info'},
        [4] =  {'Brutal Reports', "You have got freeze!", 5000, 'info'},
        [5] =  {'Brutal Reports', "You have got unfreeze!", 5000, 'info'},
        [6] =  {'Brutal Reports', "You have got revive!", 5000, 'info'},
        [7] =  {'Brutal Reports', "A new report has arrived!", 5000, 'info'},
        [8] =  {'Brutal Reports', "Has been closed!", 5000, 'info'},
        [9] =  {'Brutal Reports', "Admin Notify: OFF", 5000, 'info'},
        [10] = {'Brutal Reports', "Admin Notify: ON", 5000, 'info'},
        [11] = {'Brutal Reports', "The title is too long,<br>Maximum 25 character!", 5000, 'error'},
        [12] = {'Brutal Reports', "Please fill all the spaces!", 5000, 'error'},
        [13] = {'Brutal Reports', "You can't open your own report!", 5000, 'error'},
    }
}
client-utils.lua
if Config.Core:upper() == 'ESX' then
    LoadedEvent = 'esx:playerLoaded'
    ReviveEvent = 'esx_ambulancejob:revive'
elseif Config.Core:upper() == 'QBCORE' then
    LoadedEvent = 'QBCore:Client:OnPlayerLoaded'
    ReviveEvent = 'hospital:client:Revive'
end

-- Buy here: (4€+VAT) https://store.brutalscripts.com
function notification(title, text, time, type)
    exports['brutal_notify']:SendAlert(title, text, time, type)

    --SetNotificationTextEntry("STRING")
    --AddTextComponentString(text)
    --DrawNotification(0,1)

    -- Default ESX Notify:
    --TriggerEvent('esx:showNotification', text)

    -- Default QB Notify:
    --TriggerEvent('QBCore:Notify', text, 'info', 5000)
end
server-utils.lua
local YourWebhook = 'WEBHOOK-HERE'  -- help: https://docs.brutalscripts.com/site/others/discord-webhook

function GetWebhook()
    return YourWebhook
end

---------------------------------------------------

if Config.Core:upper() == 'ESX' then
    Core = exports['es_extended']:getSharedObject()
elseif Config.Core:upper() == 'QBCORE' then
    Core = exports['qb-core']:GetCoreObject()
end

function PlayerName(source)
    return GetPlayerName(source)
end

function StaffCheck(source)
    local staff = false

    if Config.Core:upper() == 'ESX' and Config.IdentifierPermission ~= true then
        local player = Core.GetPlayerFromId(source)
        local playerGroup = player.getGroup()

        for i, Group in ipairs(Config.AdminGroups) do
            if playerGroup == Group then
                staff = true
                break
            end
        end
    elseif Config.Core:upper() == 'QBCORE' and Config.IdentifierPermission ~= true then
            local player = Core.Functions.GetPlayer(source)
    
            for i, Group in ipairs(Config.AdminGroups) do
                if Core.Functions.HasPermission(source, Group) then
                    staff = true
                    break
                end
            end
    elseif Config.IdentifierPermission or Config.Core:upper() == 'STANDALONE' then
        for i, a in ipairs(Config.Admins) do
            for x, b in ipairs(GetPlayerIdentifiers(source)) do
                if string.lower(b) == string.lower(a) then
                    staff = true
                    break
                end
            end
        end
    end

    return staff
end

function GetIdentifier(source)
    local identifiers = {}
    for i = 0, GetNumPlayerIdentifiers(source) - 1 do
        local id = GetPlayerIdentifier(source, i)
        if string.find(id, "steam") then
            identifiers.steam = id
        elseif string.find(id, "discord") then
            identifiers.discord = id
        elseif string.find(id, "license") then
            identifiers.license = id
        end
    end


    if Config.Core:upper() == 'ESX' then
        identifier = Core.GetPlayerFromId(source).identifier
    elseif Config.Core:upper() == 'QBCORE' then
        identifier = Core.Functions.GetPlayer(source).PlayerData.citizenid
    else
        identifier = identifiers.steam
    end

    if identifier == nil then
        identifier = "-"
    end
    return identifier
end

Last updated