HEX
HexscriptsVersion 3.0Barber

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.Price = 150

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

Config.Shops = {
    {
        coords = vector3(-814.308, -183.823, 37.568),

        blip = {
            enabled = true,
            sprite = 71,
            color = 0,
            scale = 0.8,
            display = 2,
            text = 'Friseurladen'
        }
    },

    {
        coords = vector3(136.826, -1708.373, 29.291),

        blip = {
            enabled = true,
            sprite = 71,
            color = 0,
            scale = 0.8,
            display = 2,
            text = 'Friseurladen'
        }
    },

    {
        coords = vector3(-1282.604, -1116.757, 6.990),

        blip = {
            enabled = true,
            sprite = 71,
            color = 0,
            scale = 0.8,
            display = 2,
            text = 'Friseurladen'
        }
    },

    {
        coords = vector3(1931.513, 3729.671, 32.844),
        
        blip = {
            enabled = true,
            sprite = 71,
            color = 0,
            scale = 0.8,
            display = 2,
            text = 'Friseurladen'
        }
    },

    {
        coords = vector3(1212.840, -472.921, 66.208),
        
        blip = {
            enabled = true,
            sprite = 71,
            color = 0,
            scale = 0.8,
            display = 2,
            text = 'Friseurladen'
        }
    },

    {
        coords = vector3(-32.885, -152.319, 57.076),
        
        blip = {
            enabled = true,
            sprite = 71,
            color = 0,
            scale = 0.8,
            display = 2,
            text = 'Friseurladen'
        }
    },

    {
        coords = vector3(-278.077, 6228.463, 31.695),
        
        blip = {
            enabled = true,
            sprite = 71,
            color = 0,
            scale = 0.8,
            display = 2,
            text = 'Friseurladen'
        }
    }
}

Config.Actions = {
	['hairstyles'] = {
        label = 'Haarstyles',
        order = 1,
        type = true,
	},

	['facial-vegetation'] = {
        label = 'Gesicht',
        order = 2,
		buttons = {
			['Augenbrauen'] = {
				{
					name = 'eyebrows_2',
					type = 'slider'
				},

				{
					name = 'eyebrows_1',
					type = 'type'
				},

				{
					name = 'eyebrows_3',
					type = 'color',
				}
			},

			['Bart'] = {
				{
					name = 'beard_2',
					type = 'slider'
				},

				{
					name = 'beard_1',
					type = 'type'
				},

				{
					name = 'beard_3',
					type = 'color',
				}
			},

			['Ohringe'] = {
				{
					name = 'ears_1',
					type = 'type'
				},

				{
					name = 'ears_2',
					type = 'type2',
                    title = 'Ohringe'
				}
			},

			['Brusthaar'] = {
				{
					name = 'chest_2',
					type = 'slider'
				},

				{
					name = 'chest_1',
					type = 'type'
				},

				{
					name = 'chest_3',
					type = 'color',
				}
			}
		},
	},

	['cosmetcis'] = {
        label = 'Kosmetik',
        order = 3,
		buttons = {
			['Makeup'] = {
				{
					name = 'makeup_2',
					type = 'slider'
				},

				{
					name = 'makeup_1',
					type = 'type'
				},

				{
					name = 'makeup_3',
					type = 'color',
				}
			},

			['Lippenstift'] = {
				{
					name = 'lipstick_2',
					type = 'slider'
				},

				{
					name = 'lipstick_1',
					type = 'type'
				},

				{
					name = 'lipstick_3',
					type = 'color',
				}
			},

			['Erröten'] = {
				{
					name = 'blush_2',
					type = 'slider'
				},

				{
					name = 'blush_1',
					type = 'type'
				},

				{
					name = 'blush_3',
					type = 'color',
				}
			},
		},
	}
}

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