HEX
HexscriptsVersion 3.0Garage

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.ParkInAfterRestart = true

Config.ParkInRadius = 50.0
Config.SpawnBlocked = true

Config.BlacklistedNicknameStrings = {
    '<',
    '>'
}

Config.ImpoundPrice = 25000

Config.Garage = {
    ['normal'] = {
        ['car'] = {
            ['Würfelpark'] = {
                npc = vector4(100.97, -1073.49, 29.37, 73.88),

                spawn = {
                    vector4(117.73, -1081.17, 29.22, 0.01),
                    vector4(107.5753, -1080.2841, 29.1927, 336.6542)
                },

                blip = true,
                job = 'police'
            },

            ['Pillbox hill'] = {
                npc = vector4(275.182, -345.534, 45.173, 340.8157),

                spawn = {
                    vector4(266.498, -332.475, 43.43, 251.0)
                },

                blip = true,
                job = false
            },

            ['Airport'] = {
                npc = vector4(-833.0491, -2351.2185, 14.5706, 265.0966),

                spawn = {
                    vector4(-823.3708, -2341.9475, 14.5706, 145.9901)
                },

                blip = true,
                job = false
            },

            ['Plaeto'] = {
                npc = vector4(83.5884, 6420.6489, 31.7605, 222.4866),

                spawn = {
                    vector4(72.0745, 6403.6694, 31.2258, 129.73)
                },

                blip = true,
                job = false
            },

            ['Casino'] = {
                npc = vector4(889.2197, -53.8035, 78.8939, 240.2422),

                spawn = {
                    vector4(886.12, -62.68, 78.76, 236.43)
                },

                blip = true,
                job = false
            },

            ['Pearls Down'] = {
                npc = vector4(-1184.8492, -1510.0881, 4.6493, 298.4885),

                spawn = {
                    vector4(-1183.01, -1495.34, 4.38, 125.56)
                },

                blip = true,
                job = false
            },

            ['Mirror Park'] = {
                npc = vector4(1035.8422, -763.8297, 57.9930, 324.4158),

                spawn = {
                    vector4(1020.1, -766.99, 57.93, 323.98)
                },

                blip = true,
                job = false
            },

            ['Hafen'] = {
                npc = vector4(-316.3113, -2748.1731, 6.0031, 40.5344),

                spawn = {
                    vector4(-336.4048, -2739.0247, 6.0313, 311.6707)
                },

                blip = true,
                job = false
            },

            ['Rechter Highway'] = {
                npc = vector4(2763.8711, 1346.4275, 24.5240, 94.2535),

                spawn = {
                    vector4(2732.62, 1329.28, 24.52, 3.22)
                },

                blip = true,
                job = false
            },

            ['Great Ocean'] = {
                npc = vector4(-3057.2988, 115.0631, 11.6072, 298.4041),

                spawn = {
                    vector4(-3048.16, 113.88, 11.56, 315.37)
                },

                blip = true,
                job = false
            },

            ['Abschlepper Garage'] = {
                npc = vector4(393.3700, -1633.1610, 29.2919, 52.1133),

                spawn = {
                    vector4(394.37, -1617.59, 29.29, 315.91)
                },

                blip = true,
                job = false
            },

            ['Grapeseed'] = {
                npc = vector4(2480.6670, 4958.0151, 44.9472, 136.7014),

                spawn = {
                    vector4(2476.94, 4948.42, 45.07, 226.51)
                },

                blip = true,
                job = false
            },

            ['Boulevard'] = {
                npc = vector4(-619.3314, -82.5583, 41.1976, 355.9681),

                spawn = {
                    vector4(-633.2050, -74.8637, 40.4067, 359.97)
                },

                blip = true,
                job = false
            },

            ['Army'] = {
                npc = vector4(-2304.6089, 3388.6873, 31.2565, 233.7606),

                spawn = {
                    vector4(-2318.2, 3402.44, 30.68, 54.77)
                },

                blip = true,
                job = false
            }
        },

        ['helicopter'] = {
            ['Airport'] = {
                npc = vector4(-1618.6600, -3146.4800, 13.9904, 51.7247),

                spawn = {
                    vector4(-1634.86, -3149.26, 12.99, 321.48)
                },

                blip = true,
                job = false
            },

            ['Grapeseed Heli'] = {
                npc = vector4(2137.24, 4792.24, 40.97, 35.21),

                spawn = {
                    vector4(2135.76, 4809.58, 41.17, 109.21)
                },

                blip = true,
                job = false
            }
        },
    
        ['boat'] = {
            ['Stadt'] = {
                npc = vector4(-717.5, -1326.6, 1.6, 144.07),

                spawn = {
                    vector4(-717.08, -1340.12, -1, 144.07)
                },

                blip = true,
                job = false
            },

            ['Hafen'] = {
                npc = vector4(24.01, -2807.9, 5.7, 357.326),

                spawn = {
                    vector4(25.77, -2821.93, -1, 257.99)
                },

                blip = true,
                job = false
            }
        },
    
        ['airplane'] = {
            ['Airport'] = {
                npc = vector4(-1746.5889, -2923.5098, 13.9443, 331.9699),

                spawn = {
                    vector4(-1718.8448, -2922.4609, 13.9445, 239.5804)
                },

                blip = true,
                job = false
            }
        }
    },

    ['impound'] = {
        ['car'] = {    
            {
                npc = vector4(409.35, -1623.03, 29.29, 231.0),

                spawn = {
                    vector4(409.61, -1637.62, 29.29, 229.81)
                },

                blip = true,
                job = false
            },

            {
                npc = vector4(2764.1277, 1371.4186, 24.5240, 93.69),

                spawn = {
                    vector4(2752.3960, 1370.2609, 23.5240, 91.59)
                },

                blip = true,
                job = false
            },
        },
        
        ['helicopter'] = {
            {
                npc = vector4(2123.24, 4784.92, 40.97, 298.4192),

                spawn = {
                    vector4(2130.5, 4792.35, 40.12, 27.62)
                },

                blip = true,
                job = false
            },

            {
                npc = vector4(-1239.2, -3387.37, 13.94, 54.3936),

                spawn = {
                    vector4(-1254.19, -3387.25, 12.94, 322.59)
                },

                blip = true,
                job = false
            }
        },
    
        ['boat'] = {
            {
                npc = vector4(-797.29, -1420.48, 1.6, 52.4963),

                spawn = {
                    vector4(-789.82, -1429.84, -1, 141.4747)
                },

                blip = true,
                job = false
            }
        },
    
        ['airplane'] = {
            {
                npc = vector4(-1753.3730, -2896.5603, 13.9443, 238.9478),

                spawn = {
                    vector4(-1711.6436, -2863.6975, 13.7564, 331.0673)
                },

                blip = true,
                job = false
            }
        }
    }
}

Config.Blips = {
    ['normal'] = {
        ['car'] = {
            sprite = 357,
            color = 29,
            scale = 0.7,
            display = 4,
            shortRange = true,
            text = 'Auto Garage | Öffentlich',
            ped = 'cs_fbisuit_01'
        },

        ['helicopter'] = {
            sprite = 360,
            color = 29,
            scale = 0.7,
            display = 4,
            shortRange = true,
            text = 'Heli Garage | Öffentlich',
            ped = 'cs_fbisuit_01'
        },
        
        ['boat'] = {
            sprite = 356,
            color = 29,
            scale = 0.7,
            display = 4,
            shortRange = true,
            text = 'Boot Garage | Öffentlich',
            ped = 'cs_fbisuit_01'
        },

        ['airplane'] = {
            sprite = 360,
            color = 29,
            scale = 0.7,
            display = 4,
            shortRange = true,
            text = 'Flugzeug Garage | Öffentlich',
            ped = 'cs_fbisuit_01'
        }
    },

    ['impound'] = {
        ['car'] = {
            sprite = 357,
            color = 51,
            scale = 0.7,
            display = 4,
            shortRange = true,
            text = 'Auto Garage | Lager',
            ped = 'cs_fbisuit_01'
        },

        ['helicopter'] = {
            sprite = 360,
            color = 51,
            scale = 0.7,
            display = 4,
            shortRange = true,
            text = 'Heli Garage | Lager',
            ped = 'cs_fbisuit_01'
        },
        
        ['boat'] = {
            sprite = 356,
            color = 51,
            scale = 0.7,
            display = 4,
            shortRange = true,
            text = 'Boot Garage | Lager',
            ped = 'cs_fbisuit_01'
        },

        ['airplane'] = {
            sprite = 360,
            color = 51,
            scale = 0.7,
            display = 4,
            shortRange = true,
            text = 'Flugzeug Garage | Lager',
            ped = 'cs_fbisuit_01'
        }
    }
}

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

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