# Player:DrawViewModel

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

```lua
Player:DrawViewModel( boolean draw, number vm = 0 )
```

## Açıklama

Oyuncunun silahının viewmodel'ini gösterir/gizler.

## Argümanlar

1. [boolean](https://gmod.tr/wiki/boolean) **draw**: Görünür olup olmayacağı.
2. [number](https://gmod.tr/wiki/number) **vm** = 0: Hangi viewmodel'in gösterileceği/gizleneceği, 0-2.

### Örnek

Viewmodel'i etkinleştirmek/devre dışı bırakmak için istemci tarafında bir [ConVar](https://gmod.tr/wiki/ConVar) nesnesi oluşturun.

```lua
local cvarObject = CreateClientConVar("nogun", "1", true, false, "Mevcut viewmodel'i gizle.") -- ConVar nesnesini oluştur

hook.Add("HUDPaint", "draw_viewmodel", function()
	LocalPlayer():DrawViewModel( cvarObject:GetBool() ) -- DrawViewModel'in parametreleri içinde ConVar:GetBool() fonksiyonunu çağır
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/Player:DrawViewModel
