# Weapons List / Death Reasons

In client.lua there is a table called "weapons". This list contains the options for each weapon/death reason. This is where the script goes when it decides for example whether or not the weapon can show headshots, noscopes etc.

### Options

Here is a list of all options available for weapon/death reasons. All of the following need to be boolean values. It will fall back to the default if it is not specified.

* **image**; the image of the death reason (image must be a .png file). (default: none, must be specified!)
* **ignoreDeath**; if true it will be ignored the death and not show it in the feed. (default: false)
* **canHeadshot**; if true it can show headshots (default: true)
* **canDriveBy**; if true, it can show the drive-by icon (default: false)
* **canNoScope**; if true, it can show the no-scope icon (default: false)
* **showDist**; if true, it shows the distance between the killer in meters or feet (see config file) (default: false)
* **canSelf**; if true, then the victim can also be displayed as the killer. (default: true)

### Adding Custom Death Reasons

Adding custom death reasons is pretty easy. This can be used in combination with for example the OverwriteNextDeath function.

**Example**

```lua
['starvation'] = { image = "starvation", canSelf = false },
```

canSelf in this example is used so it will show that you starved to death, rather than that you "killed yourself" with starvation.

You can also add custom weapons to the list.

**Example**

```lua
[`WEAPON_HUNTINGRIFLE`] = { image = "hunting_rifle", canNoScope = true, showDist = true },
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://madsl.gitbook.io/docs/resources/cs-styled-killfeed/weapons-list-death-reasons.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
