> For the complete documentation index, see [llms.txt](https://docs.0resmon.org/0resmon/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.0resmon.org/0resmon/frkn-resources/frkn-police-job/dispatch-system/exports.md).

# Exports

## FRKN-Dispatch – Client Exports Guide

> **All exports must be called on the client side.**

### 1) Quick Start

#### Bank Robberies (requires camera ID)

```lua
exports['frkn-dispatch']:FleecaBankRobbery(1)
exports['frkn-dispatch']:PacificBankRobbery(2)
exports['frkn-dispatch']:PaletoBankRobbery(3)
```

#### Vehicle Alerts (requires vehicle entity)

```lua
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
exports['frkn-dispatch']:CarBoosting(vehicle)
exports['frkn-dispatch']:VehicleTheft(vehicle)
exports['frkn-dispatch']:SpeedingVehicle(vehicle)
```

#### Simple Alerts (no params)

```lua
exports['frkn-dispatch']:HouseRobbery()
exports['frkn-dispatch']:OfficerDown()
exports['frkn-dispatch']:Shooting()
```

***

### 2) Full API Reference

> Unless stated otherwise, exports do not require parameters.\
> `camId` = number, the linked camera ID.\
> `vehicle` = vehicle entity handle.

* `exports['frkn-dispatch']:ArtGalleryRobbery()`
* `exports['frkn-dispatch']:CarBoosting(vehicle)`
* `exports['frkn-dispatch']:CarJacking(vehicle)`
* `exports['frkn-dispatch']:CustomAlert(dataTable)`
* `exports['frkn-dispatch']:DeceasedPerson()`
* `exports['frkn-dispatch']:DrugBoatRobbery()`
* `exports['frkn-dispatch']:DrugSale()`
* `exports['frkn-dispatch']:EmsDown()`
* `exports['frkn-dispatch']:Explosion()`
* `exports['frkn-dispatch']:Fight()`
* `exports['frkn-dispatch']:FleecaBankRobbery(camId)`
* `exports['frkn-dispatch']:HouseRobbery()`
* `exports['frkn-dispatch']:HumaneRobbery()`
* `exports['frkn-dispatch']:Hunting()`
* `exports['frkn-dispatch']:InjuriedPerson()`
* `exports['frkn-dispatch']:OfficerDown()`
* `exports['frkn-dispatch']:OfficerBackup()`
* `exports['frkn-dispatch']:OfficerInDistress()`
* `exports['frkn-dispatch']:PacificBankRobbery(camId)`
* `exports['frkn-dispatch']:PaletoBankRobbery(camId)`
* `exports['frkn-dispatch']:PrisonBreak()`
* `exports['frkn-dispatch']:Shooting()`
* `exports['frkn-dispatch']:SignRobbery()`
* `exports['frkn-dispatch']:SpeedingVehicle(vehicle)`
* `exports['frkn-dispatch']:StoreRobbery(camId)`
* `exports['frkn-dispatch']:SuspiciousActivity()`
* `exports['frkn-dispatch']:TrainRobbery()`
* `exports['frkn-dispatch']:UndergroundRobbery()`
* `exports['frkn-dispatch']:UnionRobbery()`
* `exports['frkn-dispatch']:VangelicoRobbery(camId)`
* `exports['frkn-dispatch']:VanRobbery()`
* `exports['frkn-dispatch']:VehicleShooting(vehicle)`
* `exports['frkn-dispatch']:VehicleTheft(vehicle)`
* `exports['frkn-dispatch']:YachtHeist()`
* `exports['frkn-dispatch']:BobcatSecurityHeist()`

***

### 3) Real-World Examples

#### Robbery Script Integration

```lua
RegisterNetEvent('startRobbery')
AddEventHandler('startRobbery', function()
    exports['frkn-dispatch']:StoreRobbery(1)
end)
```

#### Police Script Integration

```lua
RegisterNetEvent('officerDown')
AddEventHandler('officerDown', function()
    if PlayerData.job.name == 'police' then
        exports['frkn-dispatch']:OfficerDown()
    end
end)
```

#### Vehicle Script Integration

```lua
RegisterNetEvent('vehicleStolen')
AddEventHandler('vehicleStolen', function(vehicle)
    exports['frkn-dispatch']:VehicleTheft(vehicle)
end)
```

***

### 4) Custom Alert

```lua
exports['frkn-dispatch']:CustomAlert({
    message = fullCode,
    dispatchCode = args[1],
    code = fullCode,
    icon = 'fas fa-phone',
    priority = 2,
    alert = { sprite = 14, scale = 0.5 },
    coords = GetEntityCoords(PlayerPedId()),
})
```

**Fields:**

* `message` / `code` / `dispatchCode`: text and code info
* `icon`: Font Awesome icon class
* `priority`: number (1–3)
* `alert.sprite`, `alert.scale`: blip customization
* `coords`: player coordinates

***

### 5) Creating a New Alert

#### 5.1 Add client function

```lua
local function TestAlert()
    local coords = GetEntityCoords(cache.ped)
    local vehicle = GetVehicleData(cache.vehicle)

    local dispatchData = {
        message = locale('testalert'),
        codeName = 'testalert',
        code = '10-35',
        icon = 'fas fa-car-burst',
        priority = 2,
        coords = coords,
        street = GetStreetAndZone(coords),
        heading = GetPlayerHeading(),
        vehicle = vehicle.name,
        plate = vehicle.plate,
        color = vehicle.color,
        class = vehicle.class,
        doors = vehicle.doors,
        jobs = { 'leo' }
    }

    TriggerServerEvent('frkn-dispatch:server:notify', dispatchData)
end
exports('TestAlert', TestAlert)
```

#### 5.2 Add blip config

```lua
['testalert'] = {
    radius = 0,
    sprite = 119,
    color = 1,
    scale = 1.5,
    length = 2,
    sound = 'Lose_1st',
    sound2 = 'GTAO_FM_Events_Soundset',
    offset = false,
    flash = false
},
```

> The `codeName` must match the `dispatchData.codeName` in your client function.

***

### 6) Notes & Tips

* For robbery exports with `camId`, always provide a valid camera ID.
* For vehicle-based exports, make sure `vehicle` is a valid **entity handle**.
* All exports must be called from the **client**.


---

# 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 dynamically by asking a question.

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

```
GET https://docs.0resmon.org/0resmon/frkn-resources/frkn-police-job/dispatch-system/exports.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
