Garry's Mod Wiki



  search.AddProvider( function provider, string id = "nil" )


Adds a search result provider. For examples, see gamemodes/sandbox/gamemode/cl_search_models.lua


1 function provider
Provider function. It has one argument: string searchQuery You must return a list of tables structured like this:

  • string text - Text to "Copy to clipboard"
  • function func - Function to use/spawn the item
  • Panel icon - A panel to add to spawnmenu
  • table words - A table of words?
2 string id = "nil"
If provided, ensures that only one provider exists with the given ID at a time.

Special Pages



Render Time: 24ms

DB GetPage 3
Generate Html 6
SaveChanges (1) 6
Render Body 0
Render Sidebar 6