Revision Difference
util.GetSurfaceData#523652
<function name="GetSurfaceData" parent="util" type="libraryfunc">
<description>Returns data of a surface property at given ID.</description>
<realm>Shared</realm>
<args>
<arg name="id" type="number">Surface property ID. You can get it from <page>Structures/TraceResult</page>.</arg>
</args>
<rets>
<ret name="" type="table">The data or no value if there is no valid surface property at given index.
See <page>Structures/SurfacePropertyData</page></ret>
</rets>
</function>
⤶
⤶
<example>⤶
<description>Prints the Surface Property Data of the place the player is looking at when executing the console command.</description>⤶
<code>⤶
concommand.Add( "surfprop", function( ply )⤶
local surface = ply:GetEyeTrace().SurfaceProps⤶
PrintTable( util.GetSurfaceData( surface ) )⤶
end )⤶
</code>⤶
</example>⤶