# player\_say

- **Ortam:** İstemci, Sunucu, Menü
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/gameevent/player_say
- **Çeviri tarihi:** 2025-10-19

## Açıklama

Oyuncu bir mesaj söylediğinde çağrılır.

> **NOT:** Bu, [GM:PlayerSay](https://gmod.tr/wiki/GM:PlayerSay) hook'undan sonra çağrılır, bu nedenle sunucu tarafında sadece o hook'u kullanabilirsiniz.

## Üyeler

- [number](https://gmod.tr/wiki/number) **priority**

  HLTV tarafından kullanılan olay öncelik numarası. Değeri sabit olarak 1'dir

- [number](https://gmod.tr/wiki/number) **userid**

  Oyuncunun [UserID](https://gmod.tr/wiki/Player:UserID)'si. Konsol için UserID 0'dır.

- [string](https://gmod.tr/wiki/string) **text**

  Söylenen metin.

- [number](https://gmod.tr/wiki/number) **teamonly**

  Eğer sadece takım içinse `1`, değilse `0`.

## Örnekler

### Örnek

Bu, erişilebilecek değerlerin kolayca bilinmesini sağlamak amacıyla tüm argümanları / tablo değişkenlerini içeren temel bir şablondur.

```lua
gameevent.Listen( "player_say" )
hook.Add( "player_say", "player_say_example", function( data )
	local priority = SERVER and data.Priority or 1 	// Öncelik ??
	local id = data.userid				// Konuşan oyuncunun Player:UserID() değeri ile aynı
	local text = data.text				// Yazılan metin.

	// Bir oyuncu metin yazdığında çağrılır ( PlayerSay hook'undan SONRA sunucu tarafından istemcide çağrılır )

end )
```

- [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/gameevent/player_say
