> For the complete documentation index, see [llms.txt](https://builderx.rlib.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://builderx.rlib.io/developers/functions/adddmg.md).

# AddDmg

`pl:AddDmg(` [**ⁿᵘᵐᵇᵉʳ**](https://wiki.facepunch.com/gmod/number) damage`)`

## ▸ Parameters

&#x20;     ***`int`**`    ``damage`*\
&#x20;                         amount of damage to add to existing amount

## ▸ Description

&#x20;        Adds damage to a player's total damage dealt to other players while in Build Mode\
&#x20;        Used for the punishment system.

## ▸ Example

{% tabs %}
{% tab title="Example 1" %}

```lua
local function punish_pl_hurt( pl, attk, hp, dmg )
    attk:AddDmg( dmg )
end
rhook.new.gmod( 'PlayerHurt', 'builderx_sv_punish_pl_hurt', punish_pl_hurt )
```

{% endtab %}
{% endtabs %}
