For the complete documentation index, see llms.txt. This page is also available as Markdown.

πŸ”—builderx.mode.onswitch

πŸŸ₯ π—¦π—˜π—₯π—©π—˜π—₯

builderx.mode.onswitch( ᡖˑᡃʸᡉʳ pl, ᡇᡒᡒˑ bIsBuild, ᡇᡒᡒˑ bIsForced, ᡇᡒᡒˑ bHalo, ᡇᡒᡒˑ bHud)

β–Έ Parameters

ply pl player object

bool bIsBuild returns true if player switching to build mode; false for pvp mode

bool bIsForced returns true if player forced to switch by admin command (ulx, sam, etc)

bool bHalo returns true if halo enabled on player

bool bHud returns true if player has head hud enabled

β–Έ Description

Runs when player switches modes

β–Έ Example

local function your_hook( pl, bIsBuild, bIsForced, bHalo, bHud )

    // your custom hook function here

end
hook.Add( 'builderx.mode.onswitch', 'your_hook_id', your_hook )
hook.Add( 'builderx.mode.onswitch', 'your_hook_id', function( pl, bIsBuild, bIsForced, bHalo, bHud )

    // your custom hook function here

end )
local function your_hook( pl, bIsBuild, bIsForced, bHalo, bHud )

    // your custom hook function here

end
rhook.new.rlib( 'builderx_mode_onswitch', your_hook )

Last updated