Config

This is how the configuration file for our reportsystem looks

Config = {
    Cooldown = 0, 

    Webhooks = { 
        Screenshot = 'ENTER_YOUR_WEBHOOK',
        Logs = {
            NewReport = 'ENTER_YOUR_WEBHOOK',
            RemoveReport = 'ENTER_YOUR_WEBHOOK',
            ClaimedReport = 'ENTER_YOUR_WEBHOOK'
        }
    },

    Commands = {
        createReport = 'report', 
        showReports = 'reportlist' 
    },

    Notification = function(message)
        print(message)
    end,

    Admins = {
        'discord:1022197667733983302'
    },

    IsAdmin = function(source)
        for key, value in pairs(Config.Admins) do
            for index, data in pairs(GetPlayerIdentifiers(source)) do
                if string.lower(data) == string.lower(value) then
                    return true
                end
            end
        end
        
        return false
    end

    --[[
    -- QBCore
    IsAdmin = function(source)
        QBCore = exports['qb-core']:GetCoreObject() 
        return QBCore.Functions.HasPermission(source, 'admin') or IsPlayerAceAllowed(source, 'command')
    end
    ]]
    
    --[[
    -- ESX
    IsAdmin = function(source)
        ESX = exports.es_extended:getSharedObject() 
        return ESX.GetPlayerFromId(source).group == "admin"
    end
    ]] 
}

Last updated