> 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_onnoclip.md).

# builderx.pl.onnoclip

🟥 𝗦𝗘𝗥𝗩𝗘𝗥

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

## ▸ Parameters

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

&#x20;     ***`bool`**`   ``state`*\
&#x20;                         returns **true** if player enters noclip mode; **false** if noclip taken away

## ▸ Description

&#x20;      Runs when a player uses the noclip chat command (!fly) to enter / exit noclip in build mode.

## ▸ Notes

&#x20;        Will **NOT** be called if player uses an outside method to enter noclip such as:\
&#x20;             ulx noclip, darkrp fly mode, etc.

## ▸ Example

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

```lua
local function your_hook( pl, state )

    // your custom hook function here

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

{% endtab %}

{% tab title="Example 2" %}

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

    // your custom hook function here

end )
```

{% endtab %}

{% tab title="Example 3" %}

```lua
local function your_hook( pl, state )

    // your custom hook function here

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

{% endtab %}
{% endtabs %}
