Configuration

Full View config.lua

Preview File Updated: v1.0.4 - 14.11.2024

Config = {}


-- ██    ██ ██████  ██████   █████  ████████ ███████ ███████ 
-- ██    ██ ██   ██ ██   ██ ██   ██    ██    ██      ██      
-- ██    ██ ██████  ██   ██ ███████    ██    █████   ███████ 
-- ██    ██ ██      ██   ██ ██   ██    ██    ██           ██ 
--  ██████  ██      ██████  ██   ██    ██    ███████ ███████ 

-- Enables or disables version checking (Recommended to keep it set to TRUE to ensure proper functionality and updates)
Config.EnableVersionCheck = true


-- ██       █████  ███    ██  ██████  ██    ██  █████   ██████  ███████ 
-- ██      ██   ██ ████   ██ ██       ██    ██ ██   ██ ██       ██      
-- ██      ███████ ██ ██  ██ ██   ███ ██    ██ ███████ ██   ███ █████   
-- ██      ██   ██ ██  ██ ██ ██    ██ ██    ██ ██   ██ ██    ██ ██      
-- ███████ ██   ██ ██   ████  ██████   ██████  ██   ██  ██████  ███████

Config.Language = "en" -- To add more languages, please check the docs!


-- ██████   ██████  ███████ ██ ████████ ██  ██████  ███    ██ 
-- ██   ██ ██    ██ ██      ██    ██    ██ ██    ██ ████   ██ 
-- ██████  ██    ██ ███████ ██    ██    ██ ██    ██ ██ ██  ██ 
-- ██      ██    ██      ██ ██    ██    ██ ██    ██ ██  ██ ██ 
-- ██       ██████  ███████ ██    ██    ██  ██████  ██   ████ 

Config.JailCoords = vector3(-2000.1466, 3194.9006, 32.8102)  -- Jail position
Config.ReleaseCoords = vector3(-279.8467, -922.9675, 31.2146)  -- Position after the end of the jail


-- ██████  ███████ ██████  ███    ███ ██ ███████ ███████ ██  ██████  ███    ██ ███████ 
-- ██   ██ ██      ██   ██ ████  ████ ██ ██      ██      ██ ██    ██ ████   ██ ██      
-- ██████  █████   ██████  ██ ████ ██ ██ ███████ ███████ ██ ██    ██ ██ ██  ██ ███████ 
-- ██      ██      ██   ██ ██  ██  ██ ██      ██      ██ ██ ██    ██ ██  ██ ██      ██ 
-- ██      ███████ ██   ██ ██      ██ ██ ███████ ███████ ██  ██████  ██   ████ ███████ 

Config.AuthorizedLicenses = {
    ["license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"] = true, -- Your licence
    -- Add other licenses here if needed
}


-- ██████  ███████ ███████ ████████ ██████  ██  ██████ ████████ ██  ██████  ███    ██ 
-- ██   ██ ██      ██         ██    ██   ██ ██ ██         ██    ██ ██    ██ ████   ██ 
-- ██████  █████   ███████    ██    ██████  ██ ██         ██    ██ ██    ██ ██ ██  ██ 
-- ██   ██ ██           ██    ██    ██   ██ ██ ██         ██    ██ ██    ██ ██  ██ ██ 
-- ██   ██ ███████ ███████    ██    ██   ██ ██  ██████    ██    ██  ██████  ██   ████

-- This option allows you to enable or disable the use of weapons/fists in designated areas, 
-- creating safe zones by preventing players from shooting or attacking within a set radius.

Config.RestrictionEnabled = true -- true to enable, false to disable

-- Restricted zone settings
Config.RestrictedZone = {
    x = -2000.2661, -- X coordinate of the zone
    y = 3194.8020, -- Y coordinate of the zone
    z = 32.8102, -- Z coordinate of the zone
    radius = 55.0 -- Radius of the zone in meters
}

-- Check interval (in milliseconds)
Config.CheckInterval = 500


-- ██     ██ ███████ ██████  ██   ██  ██████   ██████  ██   ██     ██████  ██ ███████  ██████  ██████  ██████  ██████  
-- ██     ██ ██      ██   ██ ██   ██ ██    ██ ██    ██ ██  ██      ██   ██ ██ ██      ██      ██    ██ ██   ██ ██   ██ 
-- ██  █  ██ █████   ██████  ███████ ██    ██ ██    ██ █████       ██   ██ ██ ███████ ██      ██    ██ ██████  ██   ██ 
-- ██ ███ ██ ██      ██   ██ ██   ██ ██    ██ ██    ██ ██  ██      ██   ██ ██      ██ ██      ██    ██ ██   ██ ██   ██ 
--  ███ ███  ███████ ██████  ██   ██  ██████   ██████  ██   ██     ██████  ██ ███████  ██████  ██████  ██   ██ ██████ 

Config.DiscordWebhook = "https://discord.com/api/webhooks/xxxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxx"


--  ██████  ████████ ██   ██ ███████ ██████  
-- ██    ██    ██    ██   ██ ██      ██   ██ 
-- ██    ██    ██    ███████ █████   ██████  
-- ██    ██    ██    ██   ██ ██      ██   ██ 
--  ██████     ██    ██   ██ ███████ ██   ██ 

Config.JailRadius = 100.0 -- Maximum distance in meters around the prison teleport point, beyond which the player will be automatically returned to detention.
Config.JailCommandName = "jail" -- Name of the command that can be used to open the menu


-- ███    ██  ██████  ████████ ██ ███████ ██  ██████  █████  ████████ ██  ██████  ███    ██ ███████ 
-- ████   ██ ██    ██    ██    ██ ██      ██ ██      ██   ██    ██    ██ ██    ██ ████   ██ ██      
-- ██ ██  ██ ██    ██    ██    ██ █████   ██ ██      ███████    ██    ██ ██    ██ ██ ██  ██ ███████ 
-- ██  ██ ██ ██    ██    ██    ██ ██      ██ ██      ██   ██    ██    ██ ██    ██ ██  ██ ██      ██ 
-- ██   ████  ██████     ██    ██ ██      ██  ██████ ██   ██    ██    ██  ██████  ██   ████ ███████ 

Config.NotificationSystem = 'esx'  -- Sets the default type, can be changed
Config.TitleNotification = 'Jail System'
Config.NotificationsDuration = 5000  -- Notification duration in milliseconds

Config.NotificationTypes = {
    okok = function(source, title, message, type)
        local duration = Config.NotificationsDuration
        if IsDuplicityVersion() then  -- Server
            if type == 'success' then
                TriggerClientEvent('okokNotify:Alert', source, title, message, duration, 'success')
            elseif type == 'error' then
                TriggerClientEvent('okokNotify:Alert', source, title, message, duration, 'error')
            elseif type == 'info' then
                TriggerClientEvent('okokNotify:Alert', source, title, message, duration, 'info')
            else
                TriggerClientEvent('okokNotify:Alert', source, title, message, duration, 'info')
            end
        else  -- Client
            if type == 'success' then
                TriggerEvent('okokNotify:Alert', title, message, duration, 'success')
            elseif type == 'error' then
                TriggerEvent('okokNotify:Alert', title, message, duration, 'error')
            elseif type == 'info' then
                TriggerEvent('okokNotify:Alert', title, message, duration, 'info')
            else
                TriggerEvent('okokNotify:Alert', title, message, duration, 'info')
            end
        end
    end,

    esx = function(source, title, message, type)
        if IsDuplicityVersion() then  -- Server
            if type == 'success' then
                TriggerClientEvent('esx:showNotification', source, '~g~' .. title .. ": " .. message)
            elseif type == 'error' then
                TriggerClientEvent('esx:showNotification', source, '~r~' .. title .. ": " .. message)
            else
                TriggerClientEvent('esx:showNotification', source, '~b~' .. title .. ": " .. message)
            end
        else  -- Client
            if type == 'success' then
                TriggerEvent('esx:showNotification', '~g~' .. title .. ": " .. message)
            elseif type == 'error' then
                TriggerEvent('esx:showNotification', '~r~' .. title .. ": " .. message)
            else
                TriggerEvent('esx:showNotification', '~b~' .. title .. ": " .. message)
            end
        end
    end,

    ox = function(source, title, message, type)
        local notifyType = 'inform'
        if type == 'success' then
            notifyType = 'success'
        elseif type == 'error' then
            notifyType = 'error'
        end

        if IsDuplicityVersion() then  -- Server
            TriggerClientEvent('ox_lib:notify', source, {title = title, description = message, type = notifyType})
        else  -- Client
            TriggerEvent('ox_lib:notify', {title = title, description = message, type = notifyType})
        end
    end
}

Last updated