Garry's Mod Wiki

Garry's Mod Wiki

The list library allows you add and retrieve values to and from lists. The list library is basically a fancy wrapper for a table, but with much more limited functionality. See Default Lists for a page of default Sandbox lists.


number list.Add( string identifier, any item )
Adds an item to a named list
boolean list.Contains( string list, any value )
Returns true if the list contains the value. (as a value - not a key) For a function that looks for a key and not a value see list. HasEntry.
table list.Get( string identifier )
Returns a copy of the list stored at identifier
table list.GetForEdit( string identifier, boolean dontCreate = false )
Returns the actual table of the list stored at identifier. Modifying this will affect the stored list
Returns a list of all lists currently in use.
boolean list.HasEntry( string list, any key )
Returns true if the list contains the given key. For a function that looks for values and not keys see list. Contains.
list.Set( string identifier, any key, any item )
Sets a specific position in the named list to a value.

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 twice a day. Edits and history are not available.

Last Parsed: Loading...