Garry's Mod Wiki

Garry's Mod Wiki

  MatSelect:AddMaterialEx( string label, string path, any value, table convars )

Description

Adds a new material to the selection list, with some extra options.

Arguments

1 string label
Tooltip for the material, for when the player hovers over the material.
2 string path
Path to the material. Relative to materials/ folder (do not include it), and do not include the .vmt extension.
3 any value
Overrides the "value" of the material. This will be what MatSelect:OnSelect receives in the first argument. It also affects MatSelect:FindMaterialByValue.
4 table convars
A list of convar names (as keys) and their values to set when the user selects this material. ContextBase:SetConVar will be ignored.

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...