# nova\_policejob

NOVA Framework police job system. Provides law enforcement tools including handcuffs, escort, search, jail, and fines.

## Features

* **Handcuffs** — Cuff and uncuff players with prop and animation
* **Escort** — Escort cuffed players (they follow you)
* **Search** — Search a player's inventory
* **Fingerprint** — Collect fingerprints from a player
* **DNA Collection** — Collect DNA evidence
* **Seize Items** — Confiscate items from a player's inventory
* **Jail** — Send players to jail with configurable time
* **Fine** — Issue fines with preset amounts
* **Target Integration** — All actions via `nova_target` context menu

## Configuration

Edit `config.lua`:

```lua
Config.JobName = 'policia'
Config.InteractDistance = 2.0

Config.CuffTime = 5000              -- Cuff duration (ms)
Config.SearchTime = 8000            -- Search duration (ms)
Config.FingerprintTime = 5000       -- Fingerprint duration (ms)
Config.DNATime = 6000               -- DNA collection duration (ms)
Config.SeizeTime = 3000             -- Seize item duration (ms)

Config.CuffProp = nil  -- Configure handcuff prop model in config

Config.JailCoords = vector3(...)   -- Configure your jail location
Config.JailExitCoords = vector3(...)  -- Configure your jail exit location
Config.DefaultJailTime = 10         -- Default jail time (minutes)
Config.MaxJailTime = 120            -- Maximum jail time (minutes)

Config.FinePresets = {
    { label = 'Excesso de Velocidade', amount = 500 },
    { label = 'Condução Perigosa', amount = 1000 },
    { label = 'Desacato à Autoridade', amount = 2000 },
    { label = 'Posse de Arma Ilegal', amount = 5000 },
    { label = 'Tráfico de Drogas', amount = 10000 },
    -- More presets...
}
```

### Configuration Options

| Option             | Type    | Description                                 |
| ------------------ | ------- | ------------------------------------------- |
| `JobName`          | string  | Job identifier in nova\_core                |
| `InteractDistance` | number  | Max distance for interactions               |
| `CuffTime`         | number  | Handcuff animation duration (ms)            |
| `SearchTime`       | number  | Search duration (ms)                        |
| `JailCoords`       | vector3 | Jail spawn location                         |
| `JailExitCoords`   | vector3 | Jail exit/release location                  |
| `DefaultJailTime`  | number  | Default jail sentence (minutes)             |
| `MaxJailTime`      | number  | Maximum jail sentence (minutes)             |
| `FinePresets`      | table   | Preset fine options with labels and amounts |

## Actions

### Cuff/Uncuff

* Target a player → "Handcuff"
* Progress bar for `CuffTime` duration
* Cuffed players cannot move, use inventory, or interact
* Handcuff prop is attached to player's wrists

### Escort

* Target a cuffed player → "Escort"
* The cuffed player follows the officer
* Use again to stop escorting

### Search

* Target a cuffed player → "Search"
* Opens the player's inventory for inspection
* Can seize items during search

### Jail

* Target a cuffed player → "Jail"
* Enter sentence time (or use default)
* Player is teleported to jail
* Timer counts down; player is released at `JailExitCoords` when done

### Fine

* Target a player → "Fine"
* Select from preset fine amounts
* Amount is deducted from the player's bank/cash

## Dependencies

* **nova\_core** — Job system, player data, money
* **nova\_target** — Targeting system
* **nova\_inventory** — Search and seize items

## Notes

* Only players with the configured job can use police actions
* Jail time persists across disconnects (stored in database)
* Fine presets can be customized for your server's legal system
* All actions require proximity and proper target lock
* Uses `nova_hud:ProgressBar` for all timed actions

## Security

* All actions are validated server-side with permission checks
* Event names and internal implementation details are not disclosed in this documentation for security purposes
* Unauthorized access attempts are logged
