# DButton:SetConsoleCommand

- **Ortam:** İstemci, Menü
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/DButton:SetConsoleCommand
- **Çeviri tarihi:** 2025-09-08

```lua
DButton:SetConsoleCommand( string command, string args = nil )
```

## Açıklama

Butona tıklandığında çağrılacak bir konsol komutu ayarlar.

Bu, butonun `DoClick` metodunu geçersiz kılar.

## Argümanlar

1. [string](https://gmod.tr/wiki/string) **command**: Çağrılacak olan konsol komutu.
2. [string](https://gmod.tr/wiki/string) **args** = nil: Komutun argümanları.

### Örnek

Oyuncunun kendi adını söylemesini sağlayan bir buton oluşturur.

```lua
local button = vgui.Create( "DButton" )
button:SetSize( 100, 35 )
button:SetText( "Say your nickname" )
button:Center()
button:MakePopup()
button:SetConsoleCommand( "say", LocalPlayer():Nick() )
```

- [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/DButton:SetConsoleCommand
