# util.GetSurfaceData

- **Ortam:** İstemci, Sunucu
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/util.GetSurfaceData
- **Çeviri tarihi:** 2025-09-08

```lua
table util.GetSurfaceData( number id )
```

## Açıklama

Belirtilen ID'deki bir [yüzey özelliğinin](https://developer.valvesoftware.com/wiki/Material_surface_properties) verisini döndürür. [physenv.AddSurfaceData](https://gmod.tr/wiki/physenv.AddSurfaceData) aracılığıyla yeni yüzey özellikleri eklenebilir.

## Argümanlar

1. [number](https://gmod.tr/wiki/number) **id**: Yüzey özelliği ID'si. Bunu [TraceResult yapısından](https://gmod.tr/wiki/Structures/TraceResult) veya [util.GetSurfaceIndex](https://gmod.tr/wiki/util.GetSurfaceIndex) kullanarak alabilirsiniz.

## Dönen Değerler

1. [table](https://gmod.tr/wiki/table), [SurfacePropertyData yapısında](https://gmod.tr/wiki/Structures/SurfacePropertyData): Veriyi döndürür. Verilen dizinde geçerli bir yüzey özelliği yoksa hiçbir değer döndürmez.

### Örnek

Konsol komutu çalıştırıldığında oyuncunun baktığı yerin Yüzey Özelliği Verilerini yazdırır.

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

**Çıktı:**

```lua
breakSound	=
bulletImpactSound	=	concrete.bulletimpact
climbable	=	0
dampening	=	0
density	=	2400
elasticity	=	0.20000000298023
friction	=	0.80000001192093
hardThreshold	=	0.5
hardVelocityThreshold	=	0
hardnessFactor	=	1
impactHardSound	=	concrete.impacthard
impactSoftSound	=	concrete.impactsoft
jumpFactor	=	1
material	=	67
maxSpeedFactor	=	1
name	=	concrete
reflectivity	=	0.66000002622604
rollingSound	=
roughThreshold	=	0.5
roughnessFactor	=	1
scrapeRoughSound	=	concrete.scraperough
scrapeSmoothSound	=	concrete.scrapesmooth
stepLeftSound	=	concrete.stepleft
stepRightSound	=	concrete.stepright
strainSound	=
thickness	=	0
```

- [GMod Wiki ana sayfası](https://gmod.tr/wiki)

---

[Tüm sunucular](https://gmod.tr/) · [GmodTR Launcher](https://gmod.tr/launcher) · [Rehber](https://gmod.tr/rehber) · [GMod Wiki](https://gmod.tr/wiki) · [GmodTR nedir?](https://gmod.tr/hakkinda) · [Sunucu ekle](https://gmod.tr/sunucu-ekle) · [Discord](https://discord.gg/gmodtr)

Kaynak: https://gmod.tr/wiki/util.GetSurfaceData
