Garry's Mod Wiki

Garry's Mod Wiki

  SANDBOX:PreReloadToolsMenu()

Description

Called right before the Lua Loaded tool menus are reloaded.

Example

Removes some tools from the spawnmenu tab. Note: the player can still take them (e.g. via console command).

-- The tools that we are going to hide from the menu. local toolsToHide = { weld = true, rope = true, } hook.Add( "PreReloadToolsMenu", "HideTools", function() -- Tool contains information about all registered tools. for name, data in pairs( weapons.GetStored( "gmod_tool" ).Tool ) do if toolsToHide[ name ] then data.AddToMenu = false end end end )

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...