# Installation

This page explains how to install **zcf\_antitank** on your FiveM server.

The resource is simple to install, but because it uses Cfx Asset Escrow, your server must have access to the asset through the correct Cfx account and license key.

### Requirements

Before installing the resource, make sure you have:

* A FiveM server with updated artifacts.
* Access to the asset from your Cfx Portal.
* A valid server license key connected to the same Cfx account that owns the asset.
* The downloaded resource folder.
* Basic access to your server files and `server.cfg`.

### Step 1: Download the resource

After purchasing the resource, download it from the correct platform or asset portal.

Make sure the resource folder is named:

```
zcf_antitank
```

Do not rename the folder.

Renaming escrowed resources can cause startup or asset access issues.

### Step 2: Upload the resource

Upload the folder into your server resources directory.

Example:

```
resources/[zcf]/zcf_antitank
```

You can place it in any resource subfolder, but the final resource folder should remain:

```
zcf_antitank
```

### Step 3: Add it to server.cfg

Open your `server.cfg` and add:

```
ensure zcf_antitank
```

Recommended example:

```
ensure zcf_antitank
```

This resource does not need to be started before ESX because it does not depend on ESX events.

However, keeping it with your core gameplay resources is recommended.

### Step 4: Check the config

Open:

```
config.lua
```

This file is editable and contains all available settings.

Before using the resource on a live server, check at least:

* `Config.Debug`
* `Config.OnlyHeadshotBullet`
* `Config.WeaponRanges`
* `Config.DefaultFirearmRange`
* `Config.AllowUnknownFirearms`
* `Config.IgnoreIfVictimInVehicle`
* `Config.IgnoreIfShooterInVehicle`

For a live server, debug mode should usually be disabled:

```
Config.Debug = false
```

### Step 5: Restart the server

Restart your FiveM server or start the resource manually from console:

```
refresh
ensure zcf_antitank
```

If everything is installed correctly, the resource should start without errors.

### Step 6: Test the resource

To test the resource properly:

1. Join the server with two players.
2. Use a weapon listed in `Config.WeaponRanges`.
3. Shoot the target in the configured head bone area.
4. Check if the kill is applied correctly.
5. If needed, enable debug mode temporarily.

Debug mode can help you see why a hit is accepted or ignored.

```
Config.Debug = true
```

After testing, set it back to:

```
Config.Debug = false
```

### Common installation issues

#### Asset is not accessible

If the resource does not start because of escrow or asset access, check:

* The asset is active in your Cfx Portal.
* Your server license key belongs to the correct Cfx account.
* The server is using the correct license key.
* Your artifacts are updated.
* The resource folder was not renamed.
* Protected files were not modified.

#### Resource starts but nothing happens

Check:

* The weapon is listed in `Config.WeaponRanges`.
* `Config.AllowUnknownFirearms` is not blocking the weapon.
* The hit is actually detected on a configured head bone.
* The target is not ignored because of vehicle settings.
* Debug mode is enabled while testing.

#### Weapon is ignored

If a weapon is ignored, it is probably not listed in `Config.WeaponRanges`.

You can either add the weapon manually or enable unknown firearms:

```
Config.AllowUnknownFirearms = true
```

If enabled, unknown firearms will use:

```
Config.DefaultFirearmRange
```

### Recommended live setup

For most roleplay servers, this is a good starting point:

```
Config.Debug = falseConfig.OnlyHeadshotBullet = trueConfig.ValidationDelayMs = 120Config.HitCooldownMs = 650Config.IgnoreIfVictimInVehicle = falseConfig.IgnoreIfShooterInVehicle = falseConfig.AllowUnknownFirearms = false
```

Then adjust weapon ranges based on your server balance.

### Support

If you need support, send:

* Product name
* Server artifact version
* Screenshot of your `config.lua`
* Full server console error
* Full client F8 error, if present
* Steps to reproduce the issue

Do not send passwords, database credentials, license keys or private server tokens.


---

# 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://zcf-development.gitbook.io/zcf_dev/resources/zcf_antitank/installation.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.
