---
description: >-
  The Trakka system replicates a real-world police vehicle key management board,
  allowing roleplay communities to view and check out vehicles assigned to a
  specific station and lock/unlock cars.
---

# Trakka Key Management

### 📦 Features

* 🔐 Full key-based vehicle locking/unlocking system
* 🧭 Per-station board system with vehicle assignments
* ⚠️ Out of service flag for vehicles
* 🔴 Live vehicle booking system — prevents duplicates
* 📋 Fully in-game admin tools (add/edit/remove vehicles & boards)
* 🧠 Parking spot assignment using manual XYZ+Heading entry
* 🖱️ ox\_target integration for immersive prop interaction
* 🧾 Data saved persistently in `boards.json`
* 🌐 Discord webhook logging

***

### 🧱 Installation

Follow instructions in [Getting Started](readme)

{% hint style="warning" %}
Ensure that the dependancies are started BEFORE this resource in server.cfg
{% endhint %}

***

### 📦 Dependancies

* [ox\_target](https://github.com/overextended/ox_target)

### 🕹️ Usage

#### 🧍 Accessing a Board

1. Approach a placed Trakka board (prop)
2. Use ox\_target to open the UI
3. View all vehicles assigned to the board

**Vehicle States:**

* ✅ **Available** – green status, can be checked out
* 🔴 **In Use** – orange status, already checked out by someone
* ⚠️ **Out of Service** – disabled, cannot be checked out

#### 🔐 Keys & Locking

* Players receive keys when checking out a vehicle
* Can lock/unlock their assigned vehicle via ox\_target
* Includes fob animation and indicator flashes
* Keys are removed when the vehicle is returned

***

#### 👮 Admin Mode

Use the **Toggle Administration** button in the UI to enable admin mode.

**Admin Actions Per Vehicle:**

| Icon | Function                                                           |
| ---- | ------------------------------------------------------------------ |
| ⚠️   | Toggle Out of Service                                              |
| ✏️   | Edit vehicle details (name, plate, model, livery, extras, parking) |
| 🗑️  | Delete vehicle from board                                          |

**Other Admin Tools:**

* 🟩 **Add Vehicle** – add a new entry to the board
* 🧭 Paste coords from clipboard (TXAdmin-friendly)
* 🧻 **Delete Board** – remove a board and its vehicles

#### ➕ Adding a Board

Use the command:

```bash
/addtrakkaboard
```

* Places a new board prop at your location
* Prompts for a station name
* Automatically syncs to all players
* Saved to `boards.json`

***

### 📤 Exports

❌ This resource currently **does not expose any exports**.

***

### ⚙️ Configuration

#### 🔧 Config.lua

```lua
Config.WebhookURL = "https://discord.com/api/webhooks/..."
Config.WebhookName = "Trakka System"
Config.WebhookAvatar = "https://i.imgur.com/AOCPLFn.png"

Config.AuthorizedAdmins = {
  ['steam:1100001ABCDEF'] = true
}
```

**🔹 `WebhookURL`**

Discord webhook endpoint to receive vehicle check-in/out logs.

**🔹 `WebhookName` and `WebhookAvatar`**

Optional: Customize the webhook sender name/icon.

**🔹 `AuthorizedAdmins`**

List of identifiers (e.g. Steam, Discord) that are allowed to manage boards and vehicles.

***
