Spawnmenu.AddTab

From GMod Wiki

Jump to: navigation, search
Function
Syntax Spawnmenu.AddTab( String Tab name, String Unique name, String icon )
Where is this used?
Description:
Adds a Tab to the Spawnmenu, must be called from within the "AddToolMenuTabs" hook.
Returns: nil
Part of Library: Spawnmenu
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Spawnmenu.AddTab]Spawnmenu.AddTab [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThis is a basic usage example.
Used onNewerClient.png
Code
 
-- Add a tab to the Q Menu
function TabAdd()
spawnmenu.AddToolTab("Name of the tab", "Unique Name")
end
-- Hook the Tab to the Menu
hook.Add( "AddToolMenuTabs", "Unique Name", TabAdd)
 
OutputN/A
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox