Garry's Mod Wiki

CreateNewAddonPreset

  CreateNewAddonPreset( string data )

Description

Creates a new Preset from the given JSON string.

Arguments

1 string data
A JSON string containing all necessary information. JSON structue should be Preset structure

Example

Creating a custom Preset.

local preset = { ["enabled"] = {}, ["disabled"] = {}, ["name"] = "Example", ["newAction"] = "" -- do nothing with addons not in the preset. } CreateNewAddonPreset( util.TableToJSON( preset ) )