> 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/installation.md).

# Installation

Step 1 — Download & Extract

1. Download `hane_gps` from your Tebex purchase.
2. Extract the `hane_gps` folder into your server's `resources` directory.

```
resources/
└── [scripts]/
    └── hane_gps/
```

***

### Step 2 — Add to Server Config

Add the following line to your `server.cfg`:

```cfg
ensure hane_gps
```

> Make sure your framework (qbx\_core / qb-core / es\_extended) and inventory system are started before `hane_gps`.

***

### Step 3 — Register the GPS Item

The GPS requires an item to be registered in your inventory system.

#### ox\_inventory

Add to `ox_inventory/data/items.lua`:

```lua
['gps_device'] = {
    label = 'GPS',
    weight = 100,
    stack = false,
    client = {
        export = 'hane_gps.useGPS'
    }
},
```

#### qb-inventory / qs-inventory

Add to your shared items file:

```lua
['gps_device'] = {
    name = 'gps_device',
    label = 'GPS',
    weight = 100,
    type = 'item',
    image = 'gps_device.png',
    unique = true,
    useable = true,
    shouldClose = true,
    description = 'GPS Tracking Device'
},
```

> For qb-inventory and qs-inventory, you also need to register a useable item callback that triggers `TriggerClientEvent('hane_gps:useItem', src)` or uses the export directly.

***

### Step 4 — Configure

Open `config.lua` and adjust settings:

```lua
Config.Framework = 'auto'   -- auto / qbx / qb / esx
Config.Inventory = 'auto'   -- auto / ox / qb / qs
Config.Language = 'en'       -- en / tr
Config.Item = 'gps_device'  -- item name in your inventory
```

***

### Step 5 — Configure Jobs

Edit `Config.Jobs` to match your server's job names:

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

***

### Step 6 — Optional Integrations

#### lb-tablet (Callsigns)

If you use `lb-tablet`, callsigns will be automatically displayed on GPS blips. Configure the callsign job type mapping:

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

#### Hane Dispatch (Unit Names)

If you use `hane_dispatch`, unit names assigned in the dispatch system will appear on GPS blips automatically. No additional configuration needed.

***

### Step 7 — Restart Server

Restart your server or use:

```
ensure hane_gps
```

***

### ✅ Verification

1. Give yourself the `gps_device` item.
2. Set your job to a configured job and go on-duty.
3. Use the GPS item to open the tracking interface.
4. Have another player with the same job activate their GPS — they should appear on your map.
