# CTakeDamageInfo:GetDamageType

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

```lua
number CTakeDamageInfo:GetDamageType()
```

## Açıklama

Hasarın hasar türünü/türlerini belirten bir bit bayrağı (bitflag) döndürür.

Bunun yerine [CTakeDamageInfo:IsDamageType](https://gmod.tr/wiki/CTakeDamageInfo:IsDamageType) kullanmayı düşünün. Bu fonksiyon tarafından döndürülen değer birden fazla hasar türü içerebilir.

## Döndürülen Değerler

1. [number](https://gmod.tr/wiki/number), [DMG enum](https://gmod.tr/wiki/Enums/DMG) ile: Hasar türü/türleri, [DMG enum](https://gmod.tr/wiki/Enums/DMG)'un bir kombinasyonu

### Örnek

Tüm bu ifadeler birbirine denktir ve hasar bilgisi (damageinfo) mermi, patlama veya sopa hasarı içeriyorsa `true` (doğru) olarak sonuçlanır:

```lua
bit.band(dmginfo:GetDamageType(), bit.bor(DMG_BULLET, DMG_BLAST, DMG_CLUB)) ~= 0
```

```lua
dmginfo:IsDamageType(DMG_BULLET + DMG_BLAST + DMG_CLUB)
```

```lua
dmginfo:IsBulletDamage() or dmginfo:IsExplosionDamage() or dmginfo:IsDamageType(DMG_CLUB)
```

- [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/CTakeDamageInfo:GetDamageType
