# Custom Weapon

## Add Custom Weapons

You can add any custom weapon from your server.

Open:

```txt
config.lua
```

Go to:

```lua
Config.Weapons = {
}
```

Add a new weapon like this:

```lua
["WEAPON_CUSTOMNAME"] = {
    label = "Custom Weapon",
    texture = "w_xx_custom",
    model = "w_xx_custom",
    category = "rifle",
    parts = {
        "w_xx_custom",
        "w_xx_custom_mag1"
    }
},
```

***

### Field Explanation

#### label

Displayed weapon name in UI.

```lua
label = "Custom Weapon"
```

#### texture

Main texture dictionary used by the weapon.

```lua
texture = "w_xx_custom"
```

#### model

Weapon world model name.

```lua
model = "w_xx_custom"
```

#### category

Used for skin compatibility.

```lua
category = "rifle"
```

Available categories:

```txt
pistol
smg
rifle
shotgun
sniper
```

#### parts

All texture dictionaries that should receive the skin.

```lua
parts = {
    "w_xx_custom",
    "w_xx_custom_mag1"
}
```

***

### Full Example

```lua
["WEAPON_UFKG19"] = {
    label = "Glock 19",
    texture = "w_pi_g19",
    model = "w_pi_g19",
    category = "pistol",
    parts = {
        "w_pi_g19",
        "w_pi_g19_mag1"
    }
},
```

***

### How to Find Names

Use your weapon files and check:

```txt
- weapon meta files
- stream .ydr names
- stream .ytd names
```

You need:

* correct model name
* correct texture dictionary name
* correct magazine / attachment texture names

***

### Important

If the weapon preview works but the skin does not apply correctly, usually one of these is wrong:

```txt
- texture
- model
- parts
```


---

# 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://elena-scripts.gitbook.io/elenascripts/gameplay/weapon-skins/custom-weapon.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.
