HEX
HexscriptsVersion 3.0Clothing

Configurations

Here you will get all configurations & open source files that are included within this script.

Config Files

Config = {}

Config.Debug = false -- Set to true to enable debug messages in the console
Config.Locale = 'automatic' -- automatic, en, de, es, fr, it, nl, pl, pt, tr, ar
Config.Framework = 'automatic' -- automatic, esx, qbcore, standalone

Config.ServerName = 'HEXSCRIPTS'

Config.Price = 150
Config.MaxSavedOutfits = 10

Config.FreezeCharacter = true -- Freeze the character fully while in the barber UI

Config.Positions = {
    {
        coords = vector3(72.3, -1399.1, 28.4),
        radius = 3.0,

        marker = {
            type = 1,
            scale = vector3(6.0, 6.0, 0.5),
            color = vector3(255, 0, 0),
            radius = 10.0,
            bobUpAndDown = false,
            faceCamera = true,
            rotate = false
        },

        blip = {
            enabled = true,
            sprite = 73,
            color = 47,
            scale = 0.8,
            display = 4,
            text = 'Kleidungsladen'
        }
    },

    {
        coords = vector3(-703.8, -152.3, 36.4),
        radius = 3.0,

        blip = {
            enabled = true,
            sprite = 73,
            color = 47,
            scale = 0.8,
            display = 4,
            text = 'Kleidungsladen'
        }
    },

    {
        coords = vector3(-167.9, -299, 38.7),
        radius = 3.0,

        blip = {
            enabled = true,
            sprite = 73,
            color = 47,
            scale = 0.8,
            display = 4,
            text = 'Kleidungsladen'
        }
    },

    {
        coords = vector3(428.7, -800.1, 28.5),
        radius = 3.0,

        blip = {
            enabled = true,
            sprite = 73,
            color = 47,
            scale = 0.8,
            display = 4,
            text = 'Kleidungsladen'
        }
    },

    {
        coords = vector3(-829.4, -1073.7, 10.3),
        radius = 3.0,

        blip = {
            enabled = true,
            sprite = 73,
            color = 47,
            scale = 0.8,
            display = 4,
            text = 'Kleidungsladen'
        }
    },

    {
        coords = vector3(-1447.8, -242.5, 48.8),
        radius = 3.0,

        blip = {
            enabled = true,
            sprite = 73,
            color = 47,
            scale = 0.8,
            display = 4,
            text = 'Kleidungsladen'
        }
    },

    {
        coords = vector3(11.6, 6514.2, 30.9),
        radius = 3.0,

        blip = {
            enabled = true,
            sprite = 73,
            color = 47,
            scale = 0.8,
            display = 4,
            text = 'Kleidungsladen'
        }
    },

    {
        coords = vector3(123.6, -219.4, 53.6),
        radius = 3.0,

        blip = {
            enabled = true,
            sprite = 73,
            color = 47,
            scale = 0.8,
            display = 4,
            text = 'Kleidungsladen'
        }
    },

    {
        coords = vector3(1696.3, 4829.3, 41.1),
        radius = 3.0,

        blip = {
            enabled = true,
            sprite = 73,
            color = 47,
            scale = 0.8,
            display = 4,
            text = 'Kleidungsladen'
        }
    },

    {
        coords = vector3(618.1, 2759.6, 41.1),
        radius = 3.0,

        blip = {
            enabled = true,
            sprite = 73,
            color = 47,
            scale = 0.8,
            display = 4,
            text = 'Kleidungsladen'
        }
    },

    {
        coords = vector3(1190.6, 2713.4, 37.2),
        radius = 3.0,

        blip = {
            enabled = true,
            sprite = 73,
            color = 47,
            scale = 0.8,
            display = 4,
            text = 'Kleidungsladen'
        }
    },

    {
        coords = vector3(-1193.4, -772.3, 16.3),
        radius = 3.0,

        blip = {
            enabled = true,
            sprite = 73,
            color = 47,
            scale = 0.8,
            display = 4,
            text = 'Kleidungsladen'
        }
    },

    {
        coords = vector3(-3172.5, 1048.1, 19.9),
        radius = 3.0,

        blip = {
            enabled = true,
            sprite = 73,
            color = 47,
            scale = 0.8,
            display = 4,
            text = 'Kleidungsladen'
        }
    },

    {
        coords = vector3(-1108.4, 2708.9, 18.1),
        radius = 3.0,

        blip = {
            enabled = true,
            sprite = 73,
            color = 47,
            scale = 0.8,
            display = 4,
            text = 'Kleidungsladen'
        }
    }
}

Config.Parts = {
    ["hat"] = {
        var_id = "helmet_1",
        color_id = "helmet_2",
        label = "Helmet",
        fov = 30.0,
        z_height = 0.65
    },

    ["glasses"] = {
        var_id = "glasses_1",
        color_id = "glasses_2",
        label = "Glasses",
        fov = 30.0,
        z_height = 0.65
    },

    ["pants"] = {
        var_id = "pants_1",
        color_id = "pants_2",
        label = "Pants",
        fov = 75.0,
        z_height = -0.425
    },

    ["shoes"] = {
        var_id = "shoes_1",
        color_id = "shoes_2",
        label = "Shoes",
        fov = 75.0,
        z_height = -0.6
    },

    ["chain"] = {
        var_id = "chain_1",
        color_id = "chain_2",
        label = "Chains",
        fov = 75.0,
        z_height = 0.25
    },

    ["watches"] = {
        var_id = "watches_1",
        color_id = "watches_2",
        label = "Watches",
        fov = 75.0,
        z_height = 0.15
    },
    
    ["earrings"] = {
        var_id = "ears_1",
        color_id = "ears_2",
        label = "Earrings",
        fov = 30.0,
        z_height = 0.65
    },

    ["decals"] = {
        var_id = "decals_1",
        color_id = "decals_2",
        label = "Decals",
        fov = 75.0,
        z_height = 0.25
    },

    ["bag"] = {
        var_id = "bags_1",
        color_id = "bags_2",
        label = "Backpack",
        fov = 75.0,
        z_height = 0.15
    },

    ["torso"] = {
        var_id = "torso_1",
        color_id = "torso_2",
        label = "Torso",
        fov = 75.0,
        z_height = 0.15
    },

    ["tshirt"] = {
        var_id = "tshirt_1",
        color_id = "tshirt_2",
        label = "T-Shirt",
        fov = 75.0,
        z_height = 0.15
    },

    ["arms"] = {
        var_id = "arms",
        color_id = "arms_2",
        label = "Glove",
        fov = 75.0,
        z_height = 0.15
    },

    ["mask"] = {
        var_id = "mask_1",
        color_id = "mask_2",
        label = "Mask",
        fov = 30.0,
        z_height = 0.65
    },

    ["bproof"] = {
        var_id = "bproof_1",
        color_id = "bproof_2",
        label = "Vest",
        fov = 75.0,
        z_height = 0.15
    }
}

Client Open Source Files

if Config.Framework == 'automatic' then
    if GetResourceState('es_extended') == 'started' then
        Config.Framework = 'esx'
    elseif GetResourceState('qb-core') == 'started' then
        Config.Framework = 'qbcore'
    else
        Config.Framework = 'standalone'
    end
end

function DrawHelpNotify(message)
    if GetResourceState('hex_final_hud') == 'started' then
        exports['hex_final_hud']:HelpNotify(message)
    elseif GetResourceState('hex_2_hud') == 'started' then
        exports['hex_2_hud']:HelpNotify(message)
    elseif GetResourceState('hex_future_hud') == 'started' then
        exports['hex_future_hud']:HelpNotify(message)
    elseif GetResourceState('hex_1_hud') == 'started' then
        exports['hex_1_hud']:HelpNotify(message)
    elseif GetResourceState('hex_hud_prem') == 'started' then
        exports['hex_hud_prem']:HelpNotify(message)
    elseif GetResourceState('hex_4_hud') == 'started' then
        exports['hex_4_hud']:HelpNotify(message)
    else
        SetTextComponentFormat('STRING')
        AddTextComponentString(message)
        DisplayHelpTextFromStringLabel(0, 0, 1, -1)
    end
end

function Notify(title, message, notifyType, timeout)
    if timeout == nil then timeout = 5000 end
    if notifyType == nil then notifyType = 'info' end

    if GetResourceState('hex_final_hud') == 'started' then
        exports['hex_final_hud']:Notify(title, message, notifyType, timeout)
    elseif GetResourceState('hex_2_hud') == 'started' then
        exports['hex_2_hud']:Notify(title, message, notifyType, timeout)
    elseif GetResourceState('hex_future_hud') == 'started' then
        exports['hex_future_hud']:Notify(title, message, notifyType, timeout)
    elseif GetResourceState('hex_1_hud') == 'started' then
        exports['hex_1_hud']:Notify(title, message, notifyType, timeout)
    elseif GetResourceState('hex_hud_prem') == 'started' then
        exports['hex_hud_prem']:Notify(title, message, notifyType, timeout)
    elseif GetResourceState('hex_hud') == 'started' then
        exports['hex_hud']:Notify(title, message, notifyType, timeout)
    elseif GetResourceState('hex_4_hud') == 'started' then
        exports['hex_4_hud']:Notify(title, message, notifyType, timeout)
    else
        print(('Notify: %s, %s, %s, %s'):format(title, message, notifyType, timeout))
    end
end

function HideHud()
    if GetResourceState('hex_final_hud') == 'started' then
        exports['hex_final_hud']:HideHud(true)
    elseif GetResourceState('hex_2_hud') == 'started' then
        exports['hex_2_hud']:HideHud(true)
    elseif GetResourceState('hex_future_hud') == 'started' then
        exports['hex_future_hud']:HideHud(true)
    elseif GetResourceState('hex_hud_prem') == 'started' then
        exports['hex_hud_prem']:HideHud(true)
    elseif GetResourceState('hex_hud') == 'started' then
        exports['hex_hud']:HideHud(true)
    elseif GetResourceState('hex_4_hud') == 'started' then
        exports['hex_4_hud']:HideHud(true)
    else
        -- own implementation
    end
end

function ShowHud()
    if GetResourceState('hex_final_hud') == 'started' then
        exports['hex_final_hud']:HideHud(false)
    elseif GetResourceState('hex_2_hud') == 'started' then
        exports['hex_2_hud']:HideHud(false)
    elseif GetResourceState('hex_future_hud') == 'started' then
        exports['hex_future_hud']:HideHud(false)
    elseif GetResourceState('hex_hud_prem') == 'started' then
        exports['hex_hud_prem']:HideHud(false)
    elseif GetResourceState('hex_hud') == 'started' then
        exports['hex_hud']:HideHud(false)
    elseif GetResourceState('hex_4_hud') == 'started' then
        exports['hex_4_hud']:HideHud(false)
    else
        -- own implementation
    end
end

Server Open Source Files

if Config.Framework == 'automatic' then
    if GetResourceState('es_extended') == 'started' then
        Config.Framework = 'esx'
    elseif GetResourceState('qb-core') == 'started' then
        Config.Framework = 'qbcore'
    else
        Config.Framework = 'standalone'
    end
end