Garry's Mod Wiki

presets.Add

  presets.Add( string groupname, string name, table values )

Description

Adds preset to a preset group.

Arguments

1 string groupname
The preset group name, usually it's tool class name.
2 string name
Preset name, must be unique.
3 table values
A table of preset console commands.

Example

A simple faceposer preset.

presets.Add( "face", "Open Eyes", { faceposer_flex0 = "1", faceposer_flex1 = "1", faceposer_flex2 = "0", faceposer_flex3 = "0", faceposer_flex4 = "0", faceposer_flex5 = "0", faceposer_flex6 = "0", faceposer_flex7 = "0", faceposer_flex8 = "0", faceposer_flex9 = "0" } )