# player\_connect\_client

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

## Açıklama

Bir oyuncu sunucuya bağlandığında çağrılır.

> **NOT:** Bu, yerel oyuncu için istemci tarafında veya tek oyunculu modda çağrılmaz.

## Üyeler

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

  Eğer oyuncu bir bot değilse 0, bot ise 1 değerini alır.

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

  Oyuncunun sahip olduğu SteamID. Botlar için `BOT`, tek oyunculu modda ise `STEAM_0:0:0` olacaktır.

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

  Oyuncunun sahip olduğu [isim](https://gmod.tr/wiki/Player.Nick).

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

  Oyuncunun sahip olduğu [UserID](https://gmod.tr/wiki/Player:UserID).

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

  Oyuncunun [EntIndex](https://gmod.tr/wiki/Entity.EntIndex)'i, eksi bir.

## Örnekler

### Örnek

Bu, hangi değerlere erişilebileceğini kolayca anlaşılır kılmak için tüm argümanları / tablo değişkenlerini dahil etme amacına sahip temel bir şablondur.

```lua
gameevent.Listen( "player_connect_client" )
hook.Add( "player_connect_client", "player_connect_client_example", function( data )
	local name = data.name			// Player:Nick() ile aynı
	local steamid = data.networkid	// Player:SteamID() ile aynı
	local id = data.userid			// Player:UserID() ile aynı
	local bot = data.bot			// Player:IsBot() ile aynı
	local index = data.index   		// Entity:EntIndex() eksi bir ile aynı

	// Oyuncu bağlandı; bu durum katıldıktan hemen sonra gerçekleşir -- bir şeyler yapın..

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_connect_client
