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

# builderx.pl.onjoin

`builderx.mode.onswitch(` [**ᵖˡᵃʸᵉʳ**](https://wiki.facepunch.com/gmod/Player) pl`)`

## ▸ Parameters

&#x20;     ***`ply`**`    ``pl`*\
&#x20;                         player object

## ▸ Description

&#x20;      Runs when player joins server and is initially setup with builderx to be in pvp mode

## ▸ Example

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

```lua
local function your_hook( pl )

    // your custom hook function here

end
hook.Add( 'builderx.pl.onjoin', 'your_hook_id', your_hook )
```

{% endtab %}

{% tab title="Example 2" %}

```lua
hook.Add( 'builderx.pl.onjoin', 'your_hook_id', function( pl )

    // your custom hook function here

end )
```

{% endtab %}

{% tab title="Example 3" %}

```lua
local function your_hook( pl )

    // your custom hook function here

end
rhook.new.rlib( 'builderx_mode_onjoin', your_hook )
```

{% endtab %}
{% endtabs %}
