# nova\_mdt

NOVA Framework Mobile Data Terminal. A comprehensive law enforcement interface for managing operations, arrests, fines, reports, and department resources.

## Features

* **Dashboard** — Overview board with department information
* **Citizen Lookup** — Search citizens by name or ID
* **Arrest System** — Process arrests with charges and jail time
* **Fine System** — Issue fines with preset amounts
* **Warning System** — Issue warnings to citizens
* **Reports** — Create, view, and manage incident reports
* **Wanted List** — Manage wanted persons
* **Seized Vehicles** — Track seized/impounded vehicles
* **Penal Code** — Reference penal code with charges and penalties
* **Medals** — Award and track officer medals
* **Units** — See active units/officers on duty
* **Department Management** — Recruit, promote, dismiss officers
* **Department Bank** — Deposit, withdraw, transfer funds with tax
* **Avatar Upload** — Upload officer photo via Discord or Fivemanage
* **Operations** — Plan and coordinate operations with map locations

## Configuration

Edit `config.lua`:

```lua
Config.AllowedJobs = { 'policia' }
Config.DefaultGroup = 'user'
Config.MaxFine = 50000
Config.MaxReductionFine = 25000
Config.MaxArrest = 120              -- Max jail time (minutes)
Config.MaxReductionArrest = 60

Config.BankTaxWithdraw = 0.05       -- 5% tax on withdrawals
Config.BankTaxTransfer = 0.02       -- 2% tax on transfers

Config.Upload = {
    Mode = 'discord',               -- 'discord' or 'fivemanage'
    Key = '',                        -- API key if using fivemanage
}

Config.Command = 'mdt'
Config.OpenKey = 'F11'

-- Hierarchy: grade index maps to rank name and permission level.
-- Higher levels unlock more features (arrests, fines, reports, wanted, bank, recruit, dismiss).
-- Configure rank names and levels in config.lua.
```

### Hierarchy Levels

Each grade maps to a permission level. Higher levels unlock more features:

| Level | Actions Available                       |
| ----- | --------------------------------------- |
| 1     | View dashboard, warnings                |
| 2     | Arrests, fines, reports, seize vehicles |
| 3     | Wanted list, operations                 |
| 4     | Bank management, medals                 |
| 5     | Recruit, promote officers               |
| 6+    | Dismiss officers, full control          |

## Commands

| Command         | Description            |
| --------------- | ---------------------- |
| `/mdt` or `F11` | Open the MDT interface |

## Dependencies

* **nova\_core** — Job system, player data
* **oxmysql** — Database operations

## Notes

* Only players with jobs in `Config.AllowedJobs` can access the MDT
* The bank tax system discourages frequent small transactions
* Operations can have map markers visible to all on-duty officers
* The MDT uses a professional dark-themed NUI with department branding
* Avatar uploads support Discord CDN or Fivemanage hosting

## 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
