Garry's Mod Wiki

Entity:GetSubMaterial

  string Entity:GetSubMaterial( number index )

Description

Returns the material override for the given index.

Returns "" if no material override exists. Use Entity:GetMaterials to list it's default materials.

The server's value takes priority on the client.

Issue Tracker: 3362

Arguments

1 number index
The index of the sub material. Acceptable values are from 0 to 31.

Returns

1 string
The material that overrides this index, if any.