# team

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

Takım kütüphanesi, Source motoruna entegre edilmiş takım sistemine erişmenizi sağlar ve özel takımlar oluşturmanıza ve onlar hakkında bilgi almanıza olanak tanır.

## Metotlar

team.[AddScore](https://gmod.tr/wiki/team.AddScore)( [number](https://gmod.tr/wiki/number) index, [number](https://gmod.tr/wiki/number) increment )

Belirtilen takımın skorunu artırır

[number](https://gmod.tr/wiki/number) team.[BestAutoJoinTeam](https://gmod.tr/wiki/team.BestAutoJoinTeam)()

En az oyuncuya sahip takımın indeksini döndürür. Başarısız olursa TEAM_UNASSIGNED'e döner

[table](https://gmod.tr/wiki/table) team.[GetAllTeams](https://gmod.tr/wiki/team.GetAllTeams)()

Tanımlanmış her takım hakkındaki bilgileri içeren gerçek tabloyu döndürür

[table](https://gmod.tr/wiki/table) team.[GetClass](https://gmod.tr/wiki/team.GetClass)( [number](https://gmod.tr/wiki/number) index )

Belirtilen takım için seçilebilir sınıfları döndürür. Bu, team.SetClass ile eklenebilir

[table](https://gmod.tr/wiki/table) team.[GetColor](https://gmod.tr/wiki/team.GetColor)( [number](https://gmod.tr/wiki/number) teamIndex )

Takımın rengini döndürür.

[string](https://gmod.tr/wiki/string) team.[GetName](https://gmod.tr/wiki/team.GetName)( [number](https://gmod.tr/wiki/number) teamIndex )

Takımın adını döndürür.

[table](https://gmod.tr/wiki/table) team.[GetPlayers](https://gmod.tr/wiki/team.GetPlayers)( [number](https://gmod.tr/wiki/number) teamIndex )

Belirtilen takımdaki tüm oyuncuları içeren bir tablo döndürür. Bu fonksiyon sıralı bir tablo döndürür, bu da verimlilik nedenleriyle pairs yerine ipairs ile döngüye alınması gerektiği anlamına gelir.

[number](https://gmod.tr/wiki/number) team.[GetScore](https://gmod.tr/wiki/team.GetScore)( [number](https://gmod.tr/wiki/number) teamIndex )

Takımın skorunu döndürür.

[table](https://gmod.tr/wiki/table) team.[GetSpawnPoint](https://gmod.tr/wiki/team.GetSpawnPoint)( [number](https://gmod.tr/wiki/number) index )

Takımın kullanabileceği geçerli doğma noktası (spawnpoint) sınıflarının bir tablosunu döndürür. Bunlar team.SetSpawnPoint ile ayarlanır.

[table](https://gmod.tr/wiki/table) team.[GetSpawnPoints](https://gmod.tr/wiki/team.GetSpawnPoints)( [number](https://gmod.tr/wiki/number) index )

Takımın kullanabileceği geçerli doğma noktası (spawnpoint) varlıklarının bir tablosunu döndürür. Bunlar team.SetSpawnPoint ile ayarlanır.

[boolean](https://gmod.tr/wiki/boolean) team.[Joinable](https://gmod.tr/wiki/team.Joinable)( [number](https://gmod.tr/wiki/number) index )

Bir takıma katılıp katılamayacağını döndürür. Bu, team.SetUp içinde ayarlanır.

[number](https://gmod.tr/wiki/number) team.[NumPlayers](https://gmod.tr/wiki/team.NumPlayers)( [number](https://gmod.tr/wiki/number) teamIndex )

Bir takımdaki oyuncu sayısını döndürür.

team.[SetClass](https://gmod.tr/wiki/team.SetClass)( [number](https://gmod.tr/wiki/number) index, [any](https://gmod.tr/wiki/any) classes )

Bir takım tarafından kullanılmak üzere geçerli sınıfları ayarlar. Sınıflar, player_manager.RegisterClass kullanılarak oluşturulabilir

team.[SetColor](https://gmod.tr/wiki/team.SetColor)( [number](https://gmod.tr/wiki/number) teamIndex, [table](https://gmod.tr/wiki/table) color )

Takımın rengini ayarlar.

team.[SetScore](https://gmod.tr/wiki/team.SetScore)( [number](https://gmod.tr/wiki/number) index, [number](https://gmod.tr/wiki/number) score )

Belirtilen takımın skorunu ayarlar

team.[SetSpawnPoint](https://gmod.tr/wiki/team.SetSpawnPoint)( [number](https://gmod.tr/wiki/number) index, [any](https://gmod.tr/wiki/any) classes )

Bir takım tarafından kullanılmak üzere geçerli doğma noktası (spawnpoint) sınıflarını ayarlar. Bunun çalışması için GM.TeamBased'in true olarak ayarlanması gerekir

team.[SetUp](https://gmod.tr/wiki/team.SetUp)( [number](https://gmod.tr/wiki/number) teamIndex, [string](https://gmod.tr/wiki/string) teamName, [table](https://gmod.tr/wiki/table) teamColor, [boolean](https://gmod.tr/wiki/boolean) isJoinable = true )

Yeni bir takım oluşturur. Bunu çağırmak için GM:CreateTeams kancasına bakın.

[number](https://gmod.tr/wiki/number) team.[TotalDeaths](https://gmod.tr/wiki/team.TotalDeaths)( [number](https://gmod.tr/wiki/number) index )

Takımdaki tüm oyuncuların toplam ölüm sayısını döndürür.

[number](https://gmod.tr/wiki/number) team.[TotalFrags](https://gmod.tr/wiki/team.TotalFrags)( [Entity](https://gmod.tr/wiki/Entity) Entity or number )

Bir takımdaki toplam leş (frag) sayısını alır.

[boolean](https://gmod.tr/wiki/boolean) team.[Valid](https://gmod.tr/wiki/team.Valid)( [number](https://gmod.tr/wiki/number) index )

Verilen takım indeksi geçerliyse true döndürür

- [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/team
