Garry's Mod Wiki

presets

The presets library lets you add and modify the pre-set options for scripted tools (selected via the white bar at the top of each tools control panel).

Methods

presets.Add( string groupname, string name, table values )
Adds preset to a preset group.
presets.BadNameAlert()
This is used internally - although you're able to use it you probably shouldn't. Used internally to tell the player that the name they tried to use in their preset is not acceptable.
boolean presets.Exists( string type, string name )
Returns whether a preset with given name exists or not
table presets.GetTable( string groupname )
Returns a table with preset names and values from a single preset group.
presets.OverwritePresetPrompt( function callback )
This is used internally - although you're able to use it you probably shouldn't. Used internally to ask the player if they want to override an already existing preset.
presets.Remove( string groupname, string name )
Removes a preset entry from a preset group.
presets.Rename( string groupname, string oldname, string newname )
Renames preset.

Page Links


Special Pages


Wikis

?

Render Time: 28ms

Session 0
DB GetPage 4
Generate Html 2
SaveChanges 8
Render Body 0
Render Sidebar 12