> ## Documentation Index
> Fetch the complete documentation index at: https://axeldevelopment.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation & Config

> Installation guide for Axel Weapon Draw.

# Installation

Follow the steps below to install Axel Weapon Draw on your FiveM server.

## Requirements

* `ox_lib`
* Frameworks: ESX, QB-Core, Qbox
* Inventories: ox\_inventory, qb-inventory, Jaksam Inventory, qs-inventory

<Warning>
  Disable the default weapon draw animations from your inventory before starting Axel Weapon Draw.

  Running two weapon animation systems at the same time may cause duplicate or broken animations.
</Warning>

## Install the Resource

Place the downloaded resource inside your server's `resources` folder.

Add the following to your `server.cfg`:

```cfg theme={null}
ensure ox_lib
ensure axel_weapondraw
```

<Note>
  Make sure `ox_lib` starts before `axel_weapondraw`.
</Note>

## ox\_inventory Setup

Open your `server.cfg` and add:

```cfg theme={null}
setr inventory:weaponanim false
```

Add this line before starting `ox_inventory`.

Example:

```cfg theme={null}
setr inventory:weaponanim false

ensure ox_lib
ensure ox_inventory
ensure axel_weapondraw
```

This disables the default weapon draw animations from `ox_inventory`.

## qb-inventory Setup

QB servers normally use the weapon animations from `qb-weapons`. Follow these steps to disable them.

### Step 1

Open:

```text theme={null}
qb-weapons/client/weapdraw.lua
```

Delete or comment out all the code inside the file:

```lua theme={null}
--[[
    Original code
]]
```

### Step 2

Open:

```text theme={null}
qb-weapons/fxmanifest.lua
```

Find:

```lua theme={null}
client_scripts {
    'client/weapdraw.lua',
    'client/main.lua'
}
```

Delete or comment out the `weapdraw.lua` line:

```lua theme={null}
client_scripts {
    -- 'client/weapdraw.lua',
    'client/main.lua'
}
```

Restart `qb-weapons` and `axel_weapondraw` after making the changes.

## Jaksam Inventory Setup

<Note>
  The exact file location may be different depending on your Jaksam Inventory version.
</Note>

Search inside the Jaksam Inventory files for:

```lua theme={null}
Config.WeaponDrawAnimation = true
```

Change it to:

```lua theme={null}
Config.WeaponDrawAnimation = false
```

This disables the default weapon draw animations from Jaksam Inventory.

## qs-inventory Setup

No additional changes should be required.

Make sure the inventory option is set to `auto` or `qs-inventory` inside `config.lua`:

```lua theme={null}
Config.Inventory = "auto"
```

or:

```lua theme={null}
Config.Inventory = "qs-inventory"
```

## Open the Menu

The default command is:

```text theme={null}
/weaponstyle
```

The default keybind is:

```text theme={null}
F6
```

You can change both options inside `config.lua`.

## Configuration

Use the section below to view the full configuration file.

<Accordion title="View full config.lua" icon="file-code">
  ```lua theme={null}
  Config = Config or {}

  -- =================================================================
  -- Configuration
  -- =================================================================
  Config.Framework = "auto"          -- Options: "auto", "qbx_core", "qbcore", "esx", "standalone"
  Config.Inventory = "auto"          -- Options: "auto", "ox_inventory", "qb-inventory", "jaksam_inventory", "qs-inventory"
  Config.NotificationType = "ox_lib" -- Options: "ox_lib", "esx", "qbcore", "custom"

  -- =================================================================
  -- Command or keybind
  -- =================================================================
  Config.MenuCommand = "weaponstyle"
  Config.DefaultMenuKey = "F6"
  Config.AllowKeybind = true

  -- =================================================================
  -- Weapon Sling
  -- =================================================================
  Config.EnableSling = true
  Config.HideSlingInVehicles = true

  -- =================================================================
  -- Default anims
  -- =================================================================
  Config.Styles = {
      Pistol = {
          [1] = {
              label = "Default Holster",
              dict = "reaction@intimidation@1h",
              anim = "intro",
              drawWait = 400,
              totalDuration = 900,
              holsterDict = "reaction@intimidation@1h",
              holsterAnim = "outro",
              holsterWait = 400
          },
          [2] = {
              label = "Back Waist",
              dict = "reaction@intimidation@cop@unarmed",
              anim = "intro",
              drawWait = 450,
              totalDuration = 950,
              holsterDict = "reaction@intimidation@cop@unarmed",
              holsterAnim = "outro",
              holsterWait = 450
          }
      },

      Rifle = {
          [1] = {
              label = "Back Draw",
              dict = "reaction@intimidation@1h",
              anim = "intro",
              drawWait = 500,
              totalDuration = 1000,
              holsterDict = "reaction@intimidation@1h",
              holsterAnim = "outro",
              holsterWait = 500
          }
      },

      Shotgun = {
          [1] = {
              label = "Back Draw",
              dict = "reaction@intimidation@1h",
              anim = "intro",
              drawWait = 500,
              totalDuration = 1000,
              holsterDict = "reaction@intimidation@1h",
              holsterAnim = "outro",
              holsterWait = 500
          }
      }
  }

  -- =================================================================
  -- Weapon List
  -- =================================================================
  Config.Weapons = {
      Pistol = {
          `WEAPON_PISTOL`,
          `WEAPON_PISTOL_MK2`,
          `WEAPON_COMBATPISTOL`,
          `WEAPON_APPISTOL`,
          `WEAPON_PISTOL50`,
          `WEAPON_SNSPISTOL`,
          `WEAPON_SNSPISTOL_MK2`,
          `WEAPON_HEAVYPISTOL`,
          `WEAPON_VINTAGEPISTOL`,
          `WEAPON_FLAREGUN`,
          `WEAPON_MARKSMANPISTOL`,
          `WEAPON_REVOLVER`,
          `WEAPON_REVOLVER_MK2`,
          `WEAPON_DOUBLEACTION`,
          `WEAPON_NAVYREVOLVER`,
          `WEAPON_GADGETPISTOL`,
          `WEAPON_STUNGUN`
      },

      Rifle = {
          `WEAPON_CARBINERIFLE`,
          `WEAPON_CARBINERIFLE_MK2`,
          `WEAPON_ASSAULTRIFLE`,
          `WEAPON_ASSAULTRIFLE_MK2`,
          `WEAPON_ADVANCEDRIFLE`,
          `WEAPON_SPECIALCARBINE`,
          `WEAPON_SPECIALCARBINE_MK2`,
          `WEAPON_BULLPUPRIFLE`,
          `WEAPON_BULLPUPRIFLE_MK2`,
          `WEAPON_COMPACTRIFLE`,
          `WEAPON_MILITARYRIFLE`,
          `WEAPON_HEAVYRIFLE`,
          `WEAPON_TACTICALRIFLE`,
          `WEAPON_MICROSMG`,
          `WEAPON_SMG`,
          `WEAPON_SMG_MK2`,
          `WEAPON_ASSAULTSMG`,
          `WEAPON_COMBATPDW`,
          `WEAPON_GUSENBERG`,
          `WEAPON_MACHINEPISTOL`,
          `WEAPON_MINISMG`,
          `WEAPON_MG`,
          `WEAPON_COMBATMG`,
          `WEAPON_COMBATMG_MK2`,
          `WEAPON_SNIPERRIFLE`,
          `WEAPON_HEAVYSNIPER`,
          `WEAPON_HEAVYSNIPER_MK2`,
          `WEAPON_MARKSMANRIFLE`,
          `WEAPON_MARKSMANRIFLE_MK2`,
          `WEAPON_PRECISIONRIFLE`,
          `WEAPON_GRENADELAUNCHER`,
          `WEAPON_RPG`,
          `WEAPON_HOMINGLAUNCHER`,
          `WEAPON_COMPACTLAUNCHER`,
          `WEAPON_RAILGUN`
      },

      Shotgun = {
          `WEAPON_PUMPSHOTGUN`,
          `WEAPON_PUMPSHOTGUN_MK2`,
          `WEAPON_SAWNOFFSHOTGUN`,
          `WEAPON_BULLPUPSHOTGUN`,
          `WEAPON_AUTOSHOTGUN`,
          `WEAPON_MUSKET`,
          `WEAPON_HEAVYSHOTGUN`,
          `WEAPON_DBSHOTGUN`,
          `WEAPON_COMBATSHOTGUN`
      }
  }

  -- =================================================================
  -- Locales
  -- =================================================================
  Config.Locales = {
      KeymappingLabel = "Weapon Draw Style Menu",
      StyleUpdatedTitle = "Style Updated",
      StyleUpdatedDesc = "Selected new style for %s"
  }
  ```
</Accordion>

## Final Check

After completing the installation:

1. Restart your server.
2. Join the server.
3. Use `/weaponstyle` or press `F6`.
4. Select an animation style.
5. Equip and holster a weapon.

<Warning>
  If two animations play at the same time, the default animations from your inventory have not been disabled correctly.
</Warning>
