# surface.PlaySound

- **Ortam:** İstemci, Menü
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/surface.PlaySound
- **Çeviri tarihi:** 2025-09-08

```lua
surface.PlaySound( string soundfile )
```

## Açıklama

Doğrudan istemci üzerinde bir ses dosyası oynatır (örneğin arayüz sesleri, vb.).

> **NOT:** Geçerli örnekleme oranları: **11025 Hz, 22050 Hz ve 44100 Hz**, aksi takdirde şu tür bir mesaj görebilirsiniz:
>
> `Unsupported 32-bit wave file your_sound.wav` ve `Invalid sample rate (48000) for sound 'your_sound.wav'`

## Argümanlar

1. [string](https://gmod.tr/wiki/string) **soundfile**: Ses dosyasının yolu. Bu, bir ses betiği adı ([sound.Add](https://gmod.tr/wiki/sound.Add)) veya `sound/` klasörüne göre bir dosya yolu olmalıdır. (klasör adının sound**s** olmadığına dikkat edin)

### Örnek

Belirtilen ada sahip bir sesi oynatır. Oyun, dosyayı aşağıdaki konumlarda belirtilen sırayla arayacaktır:

- garrysmod/addons/myaddon/sound/`mysound.wav`
- garrysmod/gamemodes/mygamemode/content/sound/`mysound.wav`
- garrysmod/sound/`mysound.wav`

```lua
surface.PlaySound( "mysound.wav" )
```

- [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/surface.PlaySound
