# core\_inventory

## in core\_inventory/client/main.lua CTRL + F and look for:

```lua
RegisterCommand('slot' .. i, function()
```

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

<figure><img src="https://2644204359-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fso4Bz1A5MlataovyRdlF%2Fuploads%2FVRRIxbM08GEVr32t8FkX%2Fcoreslot.png?alt=media&#x26;token=e03423dc-e5bf-49ea-881c-ccd944c33747" alt=""><figcaption></figcaption></figure>

## in core\_inventory/client/main.lua CTRL + F and look for:

```lua
function useWeapon(weapon, inventory)
```

* 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%2FIjzeeLmG7AZpzDuYKgJI%2Fcorewep.png?alt=media&#x26;token=173c5d8e-7976-46ed-9422-b2e41749b6e4" alt=""><figcaption></figcaption></figure></div>

## in core\_inventory/client/main.lua CTRL + F and look for:

```lua
function openInventory()
```

* 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%2FAevMA44JEXBQkfEYsVxJ%2Fcorekurac.png?alt=media&#x26;token=a5ff4d0d-14f0-45bc-b6f4-4070274b36c0" alt=""><figcaption></figcaption></figure></div>
