# Exclude inactive vehicles

{% hint style="info" %}
Would you like inactive vehicles not to have to pay taxes?&#x20;

No problem! On this page you can find out how to set it up.
{% endhint %}

#### 1. Check Script Version

To use this function you need **at least** the following script version:

* For ESX -> 1.2.5
* For QBCore -> 1.2.6

#### 2. Adjust database

First we need to add a new column in the database (based on your framework)

{% tabs %}
{% tab title="ESX" %}

```sql
ALTER TABLE owned_vehicles
ADD COLUMN last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
```

{% endtab %}

{% tab title="QB" %}
{% code fullWidth="false" %}

```sql
ALTER TABLE player_vehicles
ADD COLUMN last_update TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### 3. Set Config.ignoreVehiclesTaxPayment

The last thing you need to do is set the minimum number of days a car must be inactive before it is exempt from tax. In this example 14 Days.

```lua
Config.ignoreVehiclesTaxPayment = 14
```

{% hint style="danger" %}

```lua
Config.ignoreVehiclesTaxPayment = nil
```

This will deactivates it and does not check if vehicles is inactive!
{% endhint %}


---

# 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.gpscripts.dev/tax-system/exclude-inactive-vehicles.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.
