# Server

## addCall

```lua
exports.tk_dispatch:addCall(data)
```

Adds a call with given data

* data: `table`
  * title: `string`
  * code?: `string`
  * priority?: `string`
  * message?: `string`
  * coords: `vec3`
  * location?: `string`
  * direction?: `string`
  * gender?: `string`
  * vehicle?: `table`
    * plate: `string`
    * model: `string`
    * color: `string`
  * weapon?: `string`
  * person?: `string`
  * phoneNumber?: `string`
  * removeTime?: `number` time in milliseconds to remove call
  * showTime?: `number` time in milliseconds the call will show as a notification
  * color?: `string` color for notification left side ([ https://yeun.github.io/open-color/](< https://yeun.github.io/open-color/>))
  * flash?: `boolean`
  * playSound?: `boolean`
  * playSoundAll?: `boolean` will play a sound that all players can hear
  * jobs: `string[]`
  * blip?: `table`
    * sprite: `number`
    * scale: `number`
    * color: `number`
    * flash?: `boolean`
    * display?: `number`
    * shortRange?: `boolean`
    * radius?: `number`\
      \ <br>

## setCallsign

```lua
exports.tk_dispatch:setCallsign(playerId, callsign)
```

Sets player callsign (for dispatch UI)

* playerId: `number`
* callsign: `string`


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tk-scripts.gitbook.io/docs/tk_dispatch/exports/server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
