> 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/setdmg.md).

# SetDmg

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

## ▸ Parameters

&#x20;     ***`int`**`    ``damage`*\
&#x20;                         amount of total damage to set for player

## ▸ Description

&#x20;        Sets 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 pl_onjoin( pl )
    pl:SetDmg( 0 )
end
rhook.new.gmod( 'PlayerInitialSpawn', 'builderx_pl_join_init', pl_onjoin )
```

{% endtab %}
{% endtabs %}
