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)
    SetTextComponentFormat('STRING')
    AddTextComponentString(message)
    DisplayHelpTextFromStringLabel(0, 0, 1, -1)
end

function Notify(title, message, notifyType, timeout)
    print(('Notify: %s, %s, %s, %s'):format(title, message, notifyType, timeout))

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