Skip to content

Config

πŸ“‘ GPS Script Configuration#

This section explains the config values available in your GPS system.


πŸ”‘ Main Settings#

lua
FRKN = {
    ServerCallbacks = {},
    policeJobName = "police",
    ambulanceJobName = "ambulance",
    panicExport = function()
        exports['frkn-dispatch']:OfficerInDistress()
    end,
    gpsTracker = 'gps_tracker',
    blipRefreshTime = 1000,
    ...
}
  • ServerCallbacks β†’ Internal table for callback storage (used by the script).
  • policeJobName β†’ The job name string for police ("police").
  • ambulanceJobName β†’ The job name string for ambulance ("ambulance").
  • panicExport β†’ Function that defines what happens when a panic button is pressed. Here it calls OfficerInDistress() from frkn-dispatch.
  • gpsTracker β†’ Item name used as the GPS tracker device in the inventory (must match your item config).
  • blipRefreshTime β†’ Refresh interval (in milliseconds) for updating GPS blip positions.
    • Default: 1000 β†’ 1 second.

πŸ—Ί Blip Sprites#

lua
sprite = {
    dead = 274,
    normal = 1,
    vehicle = 225,
    motorcycle = 226,
    heli = 422,
    boat = 427,
    plane = 423,
}
  • Defines the blip icons used on the map for different player states/vehicles:
    • dead β†’ Player downed/dead blip (274).
    • normal β†’ Standard player blip (1).
    • vehicle β†’ Car icon (225).
    • motorcycle β†’ Motorcycle icon (226).
    • heli β†’ Helicopter icon (422).
    • boat β†’ Boat icon (427).
    • plane β†’ Plane icon (423).

πŸ“» Default Radio Channels#

lua
defaultChannels = {
    { name = "Police", allowedJobs = { "police" }, frequency = 1 },
    { name = "Police", allowedJobs = { "police" }, frequency = 2 },
    { name = "Ambulance", allowedJobs = { "ambulance" }, frequency = 6 },
    { name = "Ambulance", allowedJobs = { "ambulance" }, frequency = 9 },
    { name = "Ambulance & Police", allowedJobs = { "police", "ambulance" }, frequency = 10 }
}
  • Defines which radio channels are available by default.
  • name β†’ Channel display name.
  • allowedJobs β†’ Jobs that are allowed to join the channel.
  • frequency β†’ Radio frequency number.

Example setup:

  • Police β†’ frequencies 1 & 2.
  • Ambulance β†’ frequencies 6 & 9.
  • Shared Police & Ambulance β†’ frequency 10.

πŸ‘‰ In short:
This config controls which jobs can use GPS tracking, what blips they see on the map, how often GPS updates, and which default radio frequencies are available.