HEX
ResyncGPS

Configurations

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

Config Files

Config = {}

Config.Debug = true -- 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.GPS = {
    itemName = 'gps', -- Name of the GPS item in the inventory
    itemLabel = 'GPS', -- Label of the GPS item
    itemWeight = 1, -- Weight of the GPS item in inventory

    updateInterval = 'auto', -- How often the GPS updates in milliseconds (or 'auto' for automatic based on player count)
}

Config.Colors = {
    playerDefaultColor = 4, -- Default color for players
    playerDeadColor = 1, -- Color for dead players
    playerHighlightColor = { r = 0, g = 0, b = 255 }, -- Color for highlighting players (Caller Buttton)

    emergencySirenColor = 38, -- Color for emergency siren
    emergencySirenOutlineColor = { r = 255, g = 0, b = 0 }, -- Color for the emergency siren outline
}

Config.Menu = {
    x = 725,
    y = 35
}

Config.BlipScale = {
    default = 0.8, -- Default scale for blips
    dead = 0.5, -- Scale for dead players blips
}

Config.UseDeadGPS = {
    enabled = true, -- Enable or disable the use of GPS when dead
    updateWhenDead = true -- Update GPS position when dead
}

Config.UseCallerButtonItem = {
    enabled = true, -- Enable or disable the Outline of the GPS Icon when the Client has the given Item
    itemName = 'phone' -- Name of the item that enables the GPS outline when using the GPS
}

Config.UseBossGPS = {
    enabled = true, -- Enable or disable the use of GPS for bosses
    bossGradeName = 'boss' -- The grade name that is considered as boss for GPS usage
}

Config.UseEmergencySiren = {
    enabled = true -- Enable or disable the use of emergency siren for GPS
}

Config.UseTrackingSystem = true -- Enable or disable the tracking system for GPS
Config.DefaultKeybind = 'F5' -- Keybind for Opening the GPS List Menu.

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)
    elseif GetResourceState('hex_genesis_hud') == 'started' then
        exports['hex_genesis_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)
    elseif GetResourceState('hex_genesis_hud') == 'started' then
        exports['hex_genesis_hud']:Notify(title, message, notifyType, timeout)
    else
        print(('Notify: %s, %s, %s, %s'):format(title, message, notifyType, timeout))

        SetNotificationTextEntry('STRING')
        AddTextComponentString(title .. '\n' .. message)
        DrawNotification(0, 1)
    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