# Carcols Fixer

{% hint style="warning" %}
This resource requires a working FiveM server.
{% endhint %}

<details>

<summary>License &#x26; Download</summary>

Once you have completed the payment, you will get access to the product in your profile page where you can download the resource, and manage the license to the product.

You can find the **License Key** to your product in the license page.

You need to make sure the **Authorized IP** in the license page matches your servers IP (**do not include the port**).

</details>

<details>

<summary>Setting Up In Server</summary>

1. Download the product from the profile page.
2. Once the download is completed, unzip the folder.
3. Once unzipped, drag & drop the folder into your server resources.
4. Open the `config.json` file, inside you will find the following:&#x20;

   ```json
   {
       "licensekey": "LICENSE_KEY_HERE",

       "skipResources": [ "PATH/TO/RESOURCE", "PATH/TO/RESOURCE2" ],
       "checkSirenIDs": true,
       "checkLightIDs": true,
       "checkModkitIDs": true
   }
   ```
5. Replace the `LICENSE_KEY_HERE` text with your license key.
6. **We do not recommend you use this unless you know what you are doing!** If you wish to skip some resources, you can put the path to the resource in the "`skipResources`". Paths need to be literal paths (for example:  `/home/fxserver/server-data/resources/NORTHERNMODS`), and should be inside quotes (`""`) , paths need to be separated by a comma (`,`).
7. You can disable checking sirenSettings IDs by setting the "`checkSirenIDs`" to `false`
8. You can disable checking lightSettings IDs by setting the "`checkLightIDs`" to `false`
9. You can disable checking modKit IDs by setting the "`checkModkitIDs`" to `false`

To make sure the resource works, do not modify anything other than the `config.json` file.

Next move to [#starting-resource](#starting-resource "mention").

</details>

<details>

<summary>Starting Resource</summary>

The resource will begin fixing carcols IDs automatically as soon as it is started.

1. Type `refresh` in the server console.
2. To start the resource type `ensure CarcolsFixer` in the server console.
3. If you want the resource to run once the server restarts open your `server.cfg` file, and add a new line: `ensure CarcolsFixer`
4. Make sure to start/restart your vehicles **after** the CarcolsFixer has run.&#x20;

</details>

## Common Issues

### `Server crashes when resource is started.`&#x20;

This can happen when your server has many resources. To fix this disable all but one of the checks, so for example in the `config.json`:

```json
{
    "licensekey": "LICENSE_KEY_HERE",

    "skipResources": [ "PATH/TO/RESOURCE", "PATH/TO/RESOURCE2" ],
    "checkSirenIDs": true,
    "checkLightIDs": false,
    "checkModkitIDs": false
}
```

After running it like this you can run it again with a different check enabled and it will work like normal.

### `Info: <` [`PATH`](#user-content-fn-1)[^1]`>: Couldn't find any ID, will use a random number. This highly likely means you have over 255 different IDs already.`&#x20;

**This will lead to some vehicles to break!** This means there are more than 255 different sirenSettingsIDs, which is the limit in GTA V. There is currently no work around for this limit other than a client sided solution [**here**](https://www.lcpdfr.com/downloads/gta5mods/scripts/28560-sirensetting-limit-adjuster/), but this will only fix the issue for clients that have the script installed.&#x20;

### `Error: <`[`PATH`](#user-content-fn-1)[^1]`>: Unexpected close tag`

This means the carcols or carvartions file in the path given in the error has invalid syntax. To fix this, make sure to check the syntax of the file.

### `Error: Missing permission for directory: <`[`PATH`](#user-content-fn-1)[^1]`>`

This means that the script doesn't have access to the folder the script is trying to access.

To fix this make sure the script has access to the path.

[^1]: Path to a carvariations or carcols.
