Garry's Mod Wiki

util.GetSurfaceData

Description

Returns data of a surface property at given ID.

Arguments

1 number id
Surface property ID. You can get it from Structures/TraceResult.

Returns

1 table
The data or no value if there is no valid surface property at given index.

See Structures/SurfacePropertyData

Example

Prints the Surface Property Data of the place the player is looking at when executing the console command.

concommand.Add( "surfprop", function( ply ) local surface = ply:GetEyeTrace().SurfaceProps PrintTable( util.GetSurfaceData( surface ) ) end )

Page Links


Special Pages


Wikis

?

Render Time: 27ms

DB GetPage 4
Generate Html 5
SaveChanges (1) 9
Render Body 0
Render Sidebar 6