Config

Configuration File

shared/config.lua
Config = {}

if GetResourceState("es_extended") ~= "missing" then
    Config.Framework = "esx"
elseif GetResourceState("qb-core") ~= "missing" then
    Config.Framework = "qb"
else
    Config.Framework = "standalone"
end

-- For ESX only | For QB and STANDALONE, you need to use ace permission
Config.AdminGroups = {
    "developer",
    "owner",
}

Config["HeadOverlays"] = {
    [0] = {
        Label = "Blemishes",
        Icon = "user",
        Default = 0,
        Opacity = 0,
    },
    [1] = {
        Label = "Beard",
        Icon = "user",
        Default = 0,
        Opacity = 0
    },
    [2] = {
        Label = "Eyebrows",
        Icon = "user",
        Default = 0,
        Opacity = 0
    },
    [3] = {
        Label = "Ageing",
        Icon = "user",
        Default = 0,
        Opacity = 0
    },
    [4] = {
        Label = "Makeup",
        Icon = "user",
        Default = 0,
        Opacity = 0
    },
    [5] = {
        Label = "Blush",
        Icon = "user",
        Default = 0,
        Opacity = 0
    },
    [6] = {
        Label = "Complexion",
        Icon = "user",
        Default = 0,
        Opacity = 0
    },
    [7] = {
        Label = "Sun Damage",
        Icon = "user",
        Default = 0,
        Opacity = 0
    },
    [8] = {
        Label = "Lipstick",
        Icon = "user",
        Default = 0,
        Opacity = 0
    },
    [9] = {
        Label = "Moles/Freckles",
        Icon = "user",
        Default = 0,
        Opacity = 0
    },
    [10] = {
        Label = "Chest Hair",
        Icon = "user",
        Default = 0,
        Opacity = 0
    },
    [11] = {
        Label = "Body Blemishes",
        Icon = "user",
        Default = 0,
        Opacity = 0
    },
}

Config["Components"] = {
    [1] = {
        Label = "Mask",
        Icon = "mask",
        Default = 0,
    },
    [2] = {
        Label = "Hair",
        Icon = "scissors",
        Default = 21,
    },
    [3] = {
        Label = "Arms",
        Icon = "hand",
        Default = 0,
    },
    [4] = {
        Label = "Pants",
        Icon = "person",
        Default = 0,
    },
    [5] = {
        Label = "Bag",
        Icon = "bag-shopping",
        Default = 0,
    },
    [6] = {
        Label = "Shoes",
        Icon = "socks",
        Default = 0,
    },
    [7] = {
        Label = "Chain/Accessories",
        Icon = "user-tie",
        Default = 0,
    },
    [8] = {
        Label = "Shirt",
        Icon = "shirt",
        Default = 0,
    },
    [9] = {
        Label = "Vest",
        Icon = "vest",
        Default = 0,
    },
    [10] = {
        Label = "Decals",
        Icon = "pen",
        Default = 0,
    },
    [11] = {
        Label = "Torso",
        Icon = "shirt",
        Default = 0,
    },
}

Config["Props"] = {
    [0] = {
        Label = "Hat/Helmet",
        Icon = "hat-cowboy",
        Default = 0,
    },
    [1] = {
        Label = "Glasses",
        Icon = "glasses",
        Default = 0,
    },
    [2] = {
        Label = "Ear Accessory",
        Icon = "ear-listen",
        Default = 0,
    },
    [6] = {
        Label = "Watch",
        Icon = "clock",
        Default = 0,
    },
    [7] = {
        Label = "Bracelet",
        Icon = "hand-sparkles",
        Default = 0,
    },
}

Config.UseCustomNotify = false

Config.Notify = function(src, msg, type, time)
    if src then
        if Config.UseCustomNotify then
            -- Add your own notification system here
        else
            if Config.Framework == "esx" then
                TriggerClientEvent('esx:showNotification', src, msg)
            elseif Config.Framework == "qb" then
                TriggerClientEvent('QBCore:Notify', src, msg, type, time)
            elseif GetResourceState("ox_lib") ~= "missing" then
                TriggerClientEvent('ox_lib:notify', src, {
                    id = "exclu-clothing"..msg,
                    title = "Notification",
                    description = msg,
                    duration = time,
                    type = type,
                })
            end
        end
    else
        if Config.UseCustomNotify then
            -- Add your own notification system here
        else
            if Config.Framework == "esx" then
                TriggerEvent('esx:showNotification', msg)
            elseif Config.Framework == "qb" then
                TriggerEvent('QBCore:Notify', msg, type, time)
            elseif GetResourceState("ox_lib") ~= "missing" then
                TriggerEvent('ox_lib:notify', {
                    id = "exclu-clothing"..msg,
                    title = "Notification",
                    description = msg,
                    duration = time,
                    type = type,
                })
            end
        end
    end
end

Last updated