Garry's Mod Wiki

util.GetSurfaceIndex

  number util.GetSurfaceIndex( string surfaceName )

Description

Returns the matching surface property index for the given surface property name.

See also util.GetSurfaceData and util.GetSurfacePropName for opposite function.

Arguments

1 string surfaceName
The name of the surface.

Returns

1 number
The surface property index, or -1 if name doesn't correspond to a valid surface property.