# codem-inventory

## in `codem-inventory/editable/editableclient.lua` CTRL + F and look for:

```lua
function UseSlot(slotnumber)
```

* at the beginning of the function add following:
* ```lua
  if LocalPlayer.state.inDeathmatch == true then return end
  ```
* Your function should look like this:

<figure><img src="https://2644204359-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fso4Bz1A5MlataovyRdlF%2Fuploads%2FguUFr6wllRAFlUDVe5ga%2Fcodemslot.png?alt=media&#x26;token=6c1887f2-159c-4da7-aacc-cf51a70c4733" alt=""><figcaption></figcaption></figure>

## in `codem-inventory/editable/editableclient.lua` CTRL + F and look for:

```lua
RegisterNetEvent('codem-inventory:openInventory', function()
```

* at the beginning of the function add following:
* ```lua
  if LocalPlayer.state.inDeathmatch == true then return end
  ```
* Your function should look like this:

<div align="left"><figure><img src="https://2644204359-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fso4Bz1A5MlataovyRdlF%2Fuploads%2FlHFMpU3FsJ39wHBnbFTD%2Fopeninv.png?alt=media&#x26;token=ff7fb316-746c-47be-a7c5-208fe5f0a1c1" alt=""><figcaption><p>Don't delete rest of code, this is just example</p></figcaption></figure></div>
