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

# Exports & Events

Use these to connect Daddy GPS with your radio, HUD or dispatch scripts. All exports are client side.

***

### 📤 Exports

```lua
local callsign = exports['daddy-gps']:GetCallsign()
```

| Export                                              | Returns           | Description                                                                                                       |
| --------------------------------------------------- | ----------------- | ----------------------------------------------------------------------------------------------------------------- |
| `GetCallsign()`                                     | `number` or `nil` | The callsign of the player while connected.                                                                       |
| `GetGpsState()`                                     | `table`           | `{ isOpen, isConnected, callsign }`                                                                               |
| `GetCurrentProfile()`                               | `table` or `nil`  | `{ callsign }` while the GPS is open, otherwise `nil`.                                                            |
| `CalculateSignalStrength(unitCoords, playerCoords)` | `number` (0 to 4) | Signal bars between two positions. 4 under 300 m, 3 under 1500 m, 2 under 4000 m, 1 beyond that, 0 in dead zones. |
| `open()`                                            |                   | Opens the GPS. Use it as the item export.                                                                         |
| `IsGPSBroken()`                                     | `boolean`         | `true` while the GPS is broken by water.                                                                          |
| `IsInWater()`                                       | `boolean`         | `true` while the player is swimming and submerged.                                                                |
| `RepairGPS()`                                       |                   | Starts the repair of a broken GPS.                                                                                |

***

### 📡 Events

| Event                    | Side   | Description                                                                  |
| ------------------------ | ------ | ---------------------------------------------------------------------------- |
| `daddy-gps:client:open`  | client | Opens the GPS. Trigger it with `TriggerEvent('daddy-gps:client:open')`.      |
| `daddy:gps:disconnected` | client | Fired when the player is disconnected from the GPS, for example after death. |

{% hint style="info" %}
The GPS disconnects a connected unit automatically when the player dies, so nobody keeps showing up on the map after a death.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://daddy-studios.gitbook.io/daddy-studios-docs/scripts/daddy-gps/exports-and-events.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
