spawnmenu.AddCreationTab
spawnmenu.AddCreationTab( string name, function function, string material = "icon16/exclamation.png", number order = 1000, string tooltip = "nil" )
Description
Inserts a new tab into the CreationMenus table, which will be used by the creation menu to generate its tabs (Spawnlists, Weapons, Entities, etc.)
Arguments
Example
An excerpt from the Dupe creation menu tab.
spawnmenu.AddCreationTab( "#spawnmenu.category.dupes", function()
HTML = vgui.Create( "DHTML" );
JS_Language( HTML )
HTML:SetAllowLua( true );
HTML:OpenURL( "asset://garrysmod/html/dupes.html" );
HTML:Call( "SetDupeSaveState( " .. tostring( DupeInClipboard ).. " );" );
return HTML
end, "icon16/control_repeat_blue.png", 200 )
Output: A new tab named "Dupes" will be placed in the creation menu.