# NPC:GetWeapon

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

```lua
Weapon NPC:GetWeapon( string class )
```

## Açıklama

NPC'nin sahip olduğu belirli bir silahı döndürür.

## Argümanlar

1. [string](https://gmod.tr/wiki/string) **class**: Alınmaya çalışılacak silahın sınıf adı.

## Döndürdükleri

1. [Weapon](https://gmod.tr/wiki/Weapon) **wep**: Belirtilen sınıfa ait silahı veya NPC'nin bu silaha sahip olmaması durumunda NULL 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/NPC:GetWeapon
