Brutal Scripts
YouTubeDiscordStore
  • 🙉About Us
  • ↗️Translate
  • Informations
    • 🔒Escrow System
    • 🔥Common Problems
  • Scripts
    • 📄Notify
      • Accessible files
      • Installation guide
    • 🔠Text-UI
      • Installation guide
      • Exports & How to use
      • Integrations
    • 🤟Gangs
      • Accessible files
      • Installation guide
      • exports / triggers
      • Create a new gang
    • 🏡Housing
      • Accessible files
      • Installation guide
      • exports / triggers
    • 🔑Keys
      • Accessible files
      • Installation guide
      • exports / triggers
    • 💥Gang Actions
      • Accessible files
      • Installation guide
      • exports / triggers
      • Controlling the menu
    • ⭕Radial
      • Accessible files
      • Installation guide
      • Adding new buttons
    • 🎯Executions
      • Accessible files
      • Installation guide
      • exports / triggers
    • 🐶Pets + K9 V2
      • Accessible files
      • Installation guide
    • 👮Police Job
      • Accessible files
      • Installation guide
      • exports / triggers
    • 🚑Ambulance Job
      • Accessible files
      • Installation guide
      • exports / triggers
    • 🔧Mechanic Job
      • Accessible files
      • Installation guide
      • exports / triggers
    • 💪GYM with Skills V2
      • Accessible files
      • Installation guide
      • exports / triggers
    • 🔫Paintball
      • Accessible files
      • Installation guide
      • exports / triggers
    • 🥊Boxing
      • Accessible files
      • Installation guide
      • exports / triggers
    • 🔨Crafting
      • Accessible files
      • Installation guide
      • Creating a new crafting table
    • 🏦Banking
      • Accessible files
      • Installation guide
      • Paycheck transactions
      • Registering transactions
    • 🎳Bowling
      • Accessible files
      • Installation guide
      • exports / triggers
    • 🦌Hunting
      • Accessible files
      • Installation guide
    • 🏁Racing Script
      • Accessible files
      • Installation guide
    • 🐛Reports
      • Accessible files
      • Installation guide
    • 🛒Shop Robbery
      • Accessible files
      • Installation guide
    • 🛥️Yacht Heist
      • Accessible files
      • Installation guide
    • 🧾Billing
      • Accessible files
      • Installation guide
      • Triggers
    • 💰Truck Robbery
      • Accessible files
      • Installation guide
    • 🏧Atm Robbery
      • Accessible files
      • Installation guide
    • 👶Baby script
      • Installation guide
      • How to add more babys
  • Others
    • Register Key Mapping
    • Drill Minigame
    • Discord Webhook
Powered by GitBook
On this page

Was this helpful?

  1. Scripts
  2. Reports

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
PreviousReportsNextInstallation guide

Last updated 1 year ago

Was this helpful?

🐛