# Player:SetTeam

- **Ortam:** Sunucu
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/Player:SetTeam
- **Çeviri tarihi:** 2025-09-08

```lua
Player:SetTeam( number team )
```

## Açıklama

Oyuncuyu seçilen takıma atar. Değer, istemcilere imzalı bir değer olarak azaltılmış bit sayısıyla (16 bit) ağ üzerinden gönderilir, bu nedenle gerçek aralık [-32768, 32767] arasındadır.

[Player:Team](https://gmod.tr/wiki/Player:Team) aracılığıyla alınabilir.

## Argümanlar

1. [number](https://gmod.tr/wiki/number) **team**: Oyuncunun atanacağı takım.

### Örnek

Konsola "set_team" yazıldığında oyuncunun takımını ilk argümana ayarlar ve ardından oyuncuyu yeniden doğurur, örn. "set_team 1".

```lua
concommand.Add( "set_team", function( ply, cmd, args )
	local Team = args[1] or 1
	ply:SetTeam( Team )
	ply:Spawn()
end )
```

**Çıktı:** Oyuncuyu 1. takıma atar ve onları yeniden doğurur.

- [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/Player:SetTeam
