> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apex-services.site/llms.txt
> Use this file to discover all available pages before exploring further.

# APEX Polizeicomputer

> All-in-one MDT for police, DOJ, medical, and mechanic.

A comprehensive MDT / terminal system for ESX with four role-specific contexts in a single tablet-style NUI:

POLICE (records, tickets, warrants, law book, dispatch, vehicle lookups, roadblocks, panic), DOJ (court documents, warrants, law book), \
MEDICAL (injury reports, patient records, dispatch), and \
MECHANIC (work orders, vehicle records).

## Features

* Four role contexts — each with its own theme, terminal positions, allowed jobs, and grade permissions
* Criminal records — notes / tickets / crimes / photos with audit history
* Searchable law book with inline references in the ticket composer
* Document templates — court orders, medical reports, warrants with live preview
* Dispatch integration — accept / close / route, hookable to any dispatch resource
* Radio channel switching on context open (SaltyChat / pma-voice via hook)
* Vehicle plate / VIN lookups + faction admin (grades, payroll)
* Physical roadblock / cone deployment with persistence
* Redact-NPC interaction — plug Whisper / OpenAI via a hook
* Panic button with cross-job alert
* Self-contained vanilla NUI (no React, no build step)

## Requirements

<Card title="Required" icon="circle-check">
  `es_extended`, `ox_lib`, `oxmysql`
</Card>

## Installation

1. Drop `apex-polizeicomputer` into `resources/`
2. `ensure apex-polizeicomputer` — DB tables (`apex_polizei_*`) auto-create on first start

## Configuration

```lua config.lua theme={null}
Config.Contexts = {
    police   = { positions = { vector3(471.13, -1013.92, 35.8) }, jobs = { police = true }, ... },
    doj      = { ... },
    md       = { ... },
    mechanic = { ... },
}
Config.InteractionDistance = 2.0
Config.GradePermissions = {
    police = { search = 0, viewRecord = 0, editRecord = 1, addCriminalRecord = 2, ... },
    -- ...
}
```

Each context configures terminal coordinates, the allowed jobs, and a grade-based permission matrix.

## Hooks

See [Hooks reference / Polizeicomputer](/hooks/apex-polizeicomputer). Key hooks: `Hooks.SetRadioChannel`, `Hooks.OnDispatchUpdate`, `Hooks.OnAuditLog`, `Hooks.OnServerNotify`.

<Tip>
  For dispatch integration, pair this with [APEX Dispatch](/paid-scripts/apex-dispatch-app) — `Hooks.OnDispatchUpdate` ships with a one-line example for the bg-dispatch export.
</Tip>

## Resource info

<Note>
  Code accessible: `config.lua`, `hooks.lua`, `html/*`. Approximately 6000 lines of Lua + NUI. German (NUI hardcoded in v1.0.0).
</Note>
