> For the complete documentation index, see [llms.txt](https://hane-mod-studio.gitbook.io/hane-mod-studio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hane-mod-studio.gitbook.io/hane-mod-studio/hane-scripts/hane-gps/configuration.md).

# Configuration

All configuration is done in `config.lua`. Below is a complete reference.

***

### General Settings

```lua
Config.Framework = 'auto'
Config.Inventory = 'auto'
Config.Language = 'en'
Config.Item = 'gps_device'
Config.ButtonCooldown = 1000
Config.RefreshInterval = 5
```

| Option            | Type   | Default        | Description                                            |
| ----------------- | ------ | -------------- | ------------------------------------------------------ |
| `Framework`       | string | `'auto'`       | Framework: `'auto'`, `'qbx'`, `'qb'`, `'esx'`          |
| `Inventory`       | string | `'auto'`       | Inventory: `'auto'`, `'ox'`, `'qb'`, `'qs'`            |
| `Language`        | string | `'en'`         | Language code: `'en'` or `'tr'`                        |
| `Item`            | string | `'gps_device'` | Inventory item name required to use GPS                |
| `ButtonCooldown`  | number | `1000`         | Cooldown between GPS toggle actions (ms)               |
| `RefreshInterval` | number | `5`            | How often player positions sync to GPS users (seconds) |

***

### Job Configuration

```lua
Config.Jobs = {
    ['police'] = {
        enabled = true,
        label = 'POLICE',
        blipColor = 3,
        blipSprite = 1,
        blipScale = 0.8
    },
}
```

| Property     | Type    | Description                                                        |
| ------------ | ------- | ------------------------------------------------------------------ |
| `enabled`    | boolean | Whether GPS tracking is active for this job                        |
| `label`      | string  | Fallback label shown on blips (used when no callsign is available) |
| `blipColor`  | number  | GTA blip color ID                                                  |
| `blipSprite` | number  | GTA blip sprite ID                                                 |
| `blipScale`  | number  | Blip size on the map                                               |

> Only players in the **same job** can see each other on the GPS. Cross-job tracking is not supported.

***

### Callsign Job Type Mapping

```lua
Config.CallsignJobType = {
    ['police'] = 'police',
    ['sheriff'] = 'police',
    ['ambulance'] = 'ambulance',
}
```

This table maps job names to `lb-tablet` callsign types. The GPS will attempt to fetch callsigns from lb-tablet using the mapped type:

* `'police'` → `lb-tablet:GetPoliceCallsign`
* `'ambulance'` → `lb-tablet:GetAmbulanceCallsign`

If no callsign is found, the `label` from `Config.Jobs` is used as a fallback.

***

### Blip Display Logic

The GPS uses a priority system for blip labels:

1. **Callsign** from lb-tablet (if available)
2. **Unit name** from Hane Dispatch (if available)
3. **Job label** from `Config.Jobs` (fallback)

Each blip also shows the player's first and last name alongside the callsign or label.

***

### Blip Type

The GPS uses **entity-based blips** when possible, which attach directly to the player ped for smooth tracking. If the entity is not available (e.g., player too far away), it automatically falls back to **coordinate-based blips** that update on each refresh cycle.
