🔗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