> For the complete documentation index, see [llms.txt](https://kucluck.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kucluck.gitbook.io/docs/utils/kc-core-weapon/installation.md).

# Installation

### 🛠️ Step 1: Put in your resouces file

* Download resouces `kc_weapon`
* Extract file and put `kc_weapon` in your resource files

### 🛠️ Step 2: Set up Framework

* For ESX Core
  * <pre><code><strong>Config.Core         = 'ESX'
    </strong>Config.CoreFolder   = 'es_extended'
    Config.PlayerLoaded = 'esx:playerLoaded'
    Config.PlayerUnload = 'esx:onPlayerLogout'
    </code></pre>
* For Qb Core
  * ```
    Config.Core         = 'QB'
    Config.CoreFolder   = 'qb-core'
    Config.PlayerLoaded = 'QBCore:Client:OnPlayerLoaded'
    Config.PlayerUnload = 'QBCore:Client:OnPlayerUnload'
    ```

### 🛠️ Step 3: Set up Weapons

* After setting up the framework, you can configure the Kucluck Weapon script according to the existing format. You can add the weapons you use on the server. For how to add weapons, you go to line `35` of the `Config.Weapon` section, you can add custom weapons or default weapons from GTA V. Make sure you follow the format so that the weapon can function properly with this script.

```
[`WEAPON_CUSTOM`] = { -- weapon hash
    name = 'WEAPON_CUSTOM', -- weapon name
    damage = 1.0, -- damage weapon 
    critical = false, -- headshot
    recoil = 0.0, -- recoil weapon
    officer = { bone = 24818, x = 65536.0, y = 65536.0, z = 65536.0, xRot = 0.0, yRot = 0.0, zRot = 0.0}, -- location prop on body if player are officer/police
    usual = { bone = 24818, x = 65536.0, y = 65536.0, z = 65536.0, xRot = 0.0, yRot = 0.0, zRot = 0.0}, -- location prop on body if player not officer/police
    model = 'w_pi_custom', -- weapon model
    category = 'pistol' -- category weapon
}
```

### 🛠️ Step 4:  Start the resouce

* Go to `server.cfg` and replace `ensure kc_weapon`
