# Overview

`seeker_dsr2x` is a police radar modelled on the STALKER DUAL DSR 2X. Two antennas run at the same time, each with its own windows, so a car closing from the front and a car overtaking from behind are both tracked without switching antennas. For anything not covered here, the real DSR 2X Operator's Manual applies.

## Requirements

- [ox_lib](https://github.com/overextended/ox_lib), started before the radar.
- The radar only appears for a player driving or riding in front in an emergency vehicle (`Config.allowedVehicleClasses`).

> [!TIP]
> Run this radar or the [Seeker Dual](/docs/seeker_dual/overview), not both on the same key. Both open with F5.

Press **F5** to open the remote. See [Remote and operator menu](/docs/seeker_dsr2x/remote).

## The windows

```
 SAME  ┌────────────┐  FRONT REAR  ┌────────────┐
 OPP   │   TARGET   │↑  FAST       │  FAST/LOCK │↑   ┌────────────┐
 XMIT  └────────────┘↓  LOCK       └────────────┘↓   │   PATROL   │   <- shared
 SAME  ┌────────────┐↑  FAST       ┌────────────┐↑   └────────────┘
 OPP   │   TARGET   │   LOCK       │  FAST/LOCK │
 XMIT  └────────────┘↓  REAR FRONT └────────────┘↓
```

- **Top row:** the FRONT antenna. **Bottom row:** the REAR antenna. **Right:** PATROL SPEED, shared by both rows.
- There's no ANT button: neither antenna is ever "the active one". Zones, hold and locks are set per row.

| Window | Colour | Shows |
|---|---|---|
| **TARGET** | Orange | The strongest car in that antenna's beam, live |
| **FAST / LOCK** | Red | A car faster than TARGET (FAST lamp), or a locked speed (LOCK lamp). A lock wins |
| **PATROL** | Green | Your own speed |

| Arrows | Closing | Moving away |
|---|---|---|
| FRONT (top row) | ▼ | ▲ |
| REAR (bottom row) | ▲ | ▼ |

A car pacing you lights neither arrow.

## Audio

- **Doppler** tracks the TARGET window's speed only; your own speed doesn't come into it. Only one row makes noise at a time (`Config.dopplerSource`: `front`, `rear` or `strongest`). Pitch stops climbing at 100 mph.
- **Squelch** on (normal): you hear it only while a car is tracked. Off: it runs all the time, like an open beam.
- **Voice callouts:** on a lock the unit speaks the antenna, the mode and the direction. `Front`, `Rear`, `Closing` and `Away` ship; drop your own `Stationary`, `Opposite` and `Same` clips into `nui/sounds/` for the full three-word phrase.
- **Start-up:** every lamp lights and `888` shows in all five windows for three seconds.

## Plate reader

An optional overlay showing the plate each antenna is reading, with a freeze per side (`/togglepr2x` to show or hide). By default (`Config.alpr.provider = 'c3r'`) every new plate runs through c3r's own records, with no CAD needed: stolen cars, BOLOs, expired registration and no insurance raise an in-game alert, and a flagged car flashes on the map. It also turns up the odd stolen or expired car in traffic. See [With CODE3RESPONSE](/docs/seeker_dual/alpr#with-code3response).

Set the provider to `'cde'` or `'imperial'` to use your CAD instead: stolen, impounded, expired registration, no insurance and any other flag your CAD returns raise an alert, and can be posted to Discord. ImperialCAD also reports on the owner (wanted, licence revoked, expired or missing).

CAD results are cached, but **locking a plate always asks the CAD fresh**. CAD credentials go in `server.cfg`, never in the resource; setup is in the comments at the bottom of `shared/config.lua`, and works the same as the [Seeker Dual's](/docs/seeker_dual/alpr).

## What gets saved

Everything you set is remembered per player and comes back after a restart or rejoin: zones, XMIT/HLd, MOV/STA, PS BLANK, the whole Operator Menu, volumes, stopwatch distance, speed unit, plate reader, Doppler, and where the display, plate reader and remote sit.

Four things don't come back, on purpose: the power switch (it always starts off), locks, live readings, and where you were in a menu.

On the real unit a power-on resets your zones to factory positions. Here it doesn't; set `Config.rememberOperationalState = false` if you'd rather it behaved like the real thing.

## Exports and state bags

```lua
-- client
exports.seeker_dsr2x:GetRadarState()        -- full state, rows keyed front / rear
exports.seeker_dsr2x:GetRadarDetailedState()
exports.seeker_dsr2x:IsRadarActive()        -- on, and at least one antenna transmitting
exports.seeker_dsr2x:IsRadarDisplayed()
exports.seeker_dsr2x:CanControlRadar()
exports.seeker_dsr2x:CanViewRadar()

-- server
exports.seeker_dsr2x:GetPlayerRadarState(source)
exports.seeker_dsr2x:IsPlayerRadarActive(source)
```

Player state bags: `seekerDsr2xPower`, `seekerDsr2xFrontXmit`, `seekerDsr2xRearXmit`, `seekerDsr2xFrontLocked`, `seekerDsr2xRearLocked`.
