# Code 3 Matrix Script

## Step 1 - Installation

To get started, you'll need to download your new resource previously purchased from our [`store`](https://space101.store/). For that, you must login with your account on [`keymaster`](https://keymaster.fivem.net/asset-grants/) and look for the Asset Grants section, there we will find our script.

<figure><img src="https://cdn.shopify.com/s/files/1/0681/4990/3680/products/20221130150326_1.png?v=1669850877" alt="https://space101.tebex.io/package/5729631" width="563"><figcaption></figcaption></figure>

## Step 2 - Configuration

1. **Units of measurement:** You can choose between using kilometers per hour (KPH) or miles per hour (MPH) by changing the value of `useKPH`. Set it to `true` if you want to use KPH, or `false` for MPH.
2. **Speed threshold:** This determines the speed below which the extras will be toggled. Modify the value of `speedThreshold` to set the desired speed. In the example, it is set to 1.
3. **Health threshold:** To prevent unrealistic repairs when the vehicle is damaged, this part disables the effect of extras. Modify the value of `healthThreshold` to set the threshold. In the example, it is set to 850, which means the effect will be disabled if the vehicle's health is between 850 and 999.
4. **Delay between checks:** This determines the time interval in seconds between each check. Modify the value of `delay` to adjust the delay. It should be no lower than 0.5 seconds. In the example, it is set to 1.5.
5. **Vehicles and extras:** This part defines the vehicles and their associated extras. Each vehicle has a `spawnName` and two sets of extras: `pExtras` for when the vehicle is parked, and `dExtras` for when the vehicle is being driven. Modify the values in this section to configure the extras for each vehicle. In the example, three vehicles are listed with their respective extras. (note that you will need to repair the vehicle to display extras such as the spotlight and ram bars on certain models due to the way the script functions)

Compatible models:

* [Code 3 Matrix Pack](https://space101.store/products/2023-matrix-pack-part1)
* [2020 Code3 FIRE & EMS PIU](https://space101.store/products/2020-code3-fire-ems-piu-bundle)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.space101.store/product-guides/code-3-matrix-script.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
