Garry's Mod Wiki

SpawnmenuContentPanel:EnableSearch

  SpawnmenuContentPanel:EnableSearch( string category, string hookname )

Description

Changes the Spawnmenu category to search in

Arguments

1 string category
The category
2 string hookname
The Hook name

Example

local ctrl = vgui.Create( "SpawnmenuContentPanel" ) ctrl:EnableSearch( "weapons", "PopulateWeapons" ) ctrl:CallPopulateHook( "PopulateWeapons" )