Garry's Mod Wiki

list.Add

  number list.Add( string identifier, any item )

Description

Adds an item to a named list

Arguments

1 string identifier
The list identifier
2 any item
The item to add to the list

Returns

1 number
The index at which the item was added.

Example

From weapons/gmod_tool/stools/paint.lua

list.Add( "PaintMaterials", "Eye" ) list.Add( "PaintMaterials", "Smile" ) list.Add( "PaintMaterials", "Light" )