Garry's Mod Wiki

spawnmenu.CreateContentIcon

  Panel spawnmenu.CreateContentIcon( string type, Panel parent = nil, table data )

Description

Creates a new content icon, previously defined via spawnmenu.AddContentType.

Arguments

1 string type
The type of the content icon.

Default content types are:

  • model

Sandbox only content types:

  • tool
  • header
  • entity
  • vehicle
  • npc
  • weapon
  • postprocess
2 Panel parent = nil
The parent to add the content icon to.
3 table data
The data to send to the content icon in spawnmenu.AddContentType. Data required will depend on the content type.

Returns

1 Panel
The created content icon, if it was returned by spawnmenu.AddContentType.