---
description: Check the instructions below.
---

# Configuration



The script offers two main configuration files: **Config.lua** and **server\_config.lua**.

***

#### Config.lua

The `Config.lua` file defines the settings for benches, items, and attachments. Below is a breakdown of the options:

**General Settings**

| Setting  | Description              | Default Value |
| -------- | ------------------------ | ------------- |
| `locale` | Language for the script. | `"en"`        |

***

**Bench Configuration**

Benches can be configured using the following options:

| Setting  | Description                                           |
| -------- | ----------------------------------------------------- |
| `type`   | Specifies the type of bench (`prop`, `coords`).       |
| `model`  | Model of the bench (for props).                       |
| `coords` | Position of the bench (for coordinate-based benches). |

**Example Bench Configuration:**

```lua
luaCopy codeBenchs = {
    {
        type = "prop",
        model = "gr_prop_gr_bench_04a",
    },
    {
        type = "coords",
        coords = vector3(-2131.84, 3267.4, 32.81),
    },
    {
        type = "createProp",
        model = "gr_prop_gr_bench_04b",
        coords = vector4(-2136.1301, 3257.9106, 31.8103, -30.2677),
    }
}
```

***

**Item Configuration**

Items and their attachments can be customized as follows:

| Setting       | Description                                  |
| ------------- | -------------------------------------------- |
| `label`       | Name of the weapon or attachment.            |
| `image`       | Image file for the item (in `html/images/`). |
| `Attachments` | List of attachments for the weapon.          |

**Example Weapon Configuration:**

```lua
luaCopy codeItems = {
    ["weapon_assaultrifle"] = {
        label = "Assault Rifle",
        image = "assault_rifle.png",
        Attachments = {
            ["default_clip"] = {
                component = "COMPONENT_ASSAULTRIFLE_CLIP_01",
                label = "Default Clip",
                item = "default_clip",
                image = "default_clip.png",
                description = "Standard issue clip for the assault rifle.",
            },
            ["scope"] = {
                component = "COMPONENT_AT_SCOPE_MACRO",
                label = "Scope",
                item = "scope",
                image = "scope.png",
                description = "Scope for enhanced targeting accuracy.",
            },
        }
    }
}
```

***

**Attachment Tags**

Attachment-specific properties include:

| Property      | Description                             |
| ------------- | --------------------------------------- |
| `damageTag`   | Affects weapon damage (`true/false`).   |
| `accuracyTag` | Affects weapon accuracy (`true/false`). |
| `key`         | Key for the attachment category.        |

***

#### server\_config.lua

The `server_config.lua` file manages server-side configurations such as Discord integration.

| Setting           | Description                                             | Default Value                |
| ----------------- | ------------------------------------------------------- | ---------------------------- |
| `PhotoType`       | Source of player photos (`steam`).                      | `"steam"`                    |
| `NoImage`         | URL for placeholder image.                              | `"https://cdn.discordapp...` |
| `DiscordBotToken` | Token for Discord bot integration (replace with yours). | `"YOUR_DISCORD_BOT_TOKEN"`   |

**Example Configuration:**

```lua
luaCopy codeConfig.PhotoType = "steam"
Config.NoImage = "https://cdn.discordapp.com/attachments/736562375062192199/995301291976831026/noimage.png"
Config.DiscordBotToken = "YOUR_DISCORD_BOT_TOKEN"
```

***

### Usage

#### Weapon Attachments

* **Attach Components:** Attach specific components such as scopes, grips, and suppressors by interacting with configured benches.

#### Notifications

Notifications can be displayed to the player for various attachment actions.

**Example Notification Trigger:**

```lua
luaCopy codeTriggerEvent("gfx_attachment:notify", "Attachment added!", "success", 5000)
```

* **Message:** Notification message.
* **Type:** Notification type (`success`, `error`).
* **Duration:** Time in milliseconds.

***
