# Installation

Add dependencies:

1. ox\_lib: <https://github.com/overextended/ox_lib/releases/latest>
2. ox\_targert : <https://github.com/overextended/ox_target/releases/latest>

### **Step 1:**

1. Download `ak47_inventory` from your keymaster.
2. Add the script into your resources folder.
3. `start ak47_inventory` in server.cfg after es\_extended and make sure all other scripts are starting after the inventory script.
4. Set discord webhook in `ak47_inventory/webhooks.lua`

### Step 2:

Make the following changes in your `es_extended`

{% tabs %}
{% tab title="Latest ESX:" %}
es\_extended/shared/config/main.lua

```lua
Config.CustomInventory = false
---
---
---
if GetResourceState("ox_inventory") ~= "missing" then
    Config.CustomInventory = false
end
---
---
---
Config.EnableDefaultInventory = false
```

{% endtab %}

{% tab title="Previous ESX" %}
es\_extended/config.lua

```lua
Config.OxInventory = false
---
---
---
Config.EnableDefaultInventory = false
```

{% endtab %}
{% endtabs %}

{% embed url="<https://youtu.be/RqGpIJ-lg7g>" %}

### Step 3:

Make the following changes in your `es_extended/server/classes/player.lua`

* Add this code inside `CreateExtendedPlayer` function.

check the image below to confirm

```lua
function self.AddMethod(methodName, handler)
    self[methodName] = handler
end
```

* Add this code after `CreateExtendedPlayer` function.

check the image below to confirm

```lua
function ESX.AddPlayerMethod(id, methodName, handler)
    if not ESX.Players[id] then return end
    ESX.Players[id].AddMethod(methodName, handler)
end

function ESX.SetMethod(key, value)
    ESX[key] = value
end
```

{% tabs %}
{% tab title="After Modification" %}

<figure><img src="https://2088945756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkHcyR2RbVMcj5NHJ2HEa%2Fuploads%2Fa6WXzY1ISrkij5XNbqtV%2Fimage.png?alt=media&#x26;token=a3c637c8-40d2-4776-acaa-9a510fa01b76" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Before Modification" %}

<figure><img src="https://2088945756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkHcyR2RbVMcj5NHJ2HEa%2Fuploads%2FvBvHTRRHeQOL2uog4sWP%2Fimage.png?alt=media&#x26;token=549efbe1-c5b5-4e63-94d6-34c4c88a1a5e" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

{% embed url="<https://youtu.be/o9q1WzDJ9cA>" %}

#### **Notes:**&#x20;

* Don't upload the script with FileZilla, Use Winscp if you are using FTP for file uploading.
* Renaming of the script is not allowed.
* We do not support custom frameworks, highly modified versions of ESX, or deprecated/outdated versions of anything.&#x20;
