# GM:AcceptInput

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

```lua
boolean GM:AcceptInput( Entity ent, string input, Entity activator, Entity caller, any value )
```

## Açıklama

Bir harita G/Ç (Giriş/Çıkış) olayı meydana geldiğinde çağrılır.

Entity'ler üzerinde Girdi (Input) tetikleyecek fonksiyonlar için ayrıca bakınız: [Entity:Fire](https://gmod.tr/wiki/Entity.Fire) ve [Entity:Input](https://gmod.tr/wiki/Entity.Input).

## Argümanlar

1. [Entity](https://gmod.tr/wiki/Entity) **ent**: Girdiyi alan entity
2. [string](https://gmod.tr/wiki/string) **input**: Girdinin adı. Entity üzerinde geçerli bir girdi olacağı garanti edilmez.
3. [Entity](https://gmod.tr/wiki/Entity) **activator**: Girdinin etkinleştiricisi (activator)
4. [Entity](https://gmod.tr/wiki/Entity) **caller**: Girdinin çağırıcısı (caller)
5. [any](https://gmod.tr/wiki/any) **value**: Girdiyle birlikte sağlanan veri. Bu bir [string](https://gmod.tr/wiki/string) (metin), bir [number](https://gmod.tr/wiki/number) (sayı), bir [boolean](https://gmod.tr/wiki/boolean) (doğru/yanlış değeri) veya bir [nil](https://gmod.tr/wiki/nil) (boş değer) olacaktır.

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

1. [boolean](https://gmod.tr/wiki/boolean): Bu girdinin işlenmesini önlemek için true döndürün. Aksi takdirde bir şey döndürmeyin.

### Örnek

Bu, lua_run entity'sinin alacağı herhangi bir girdiyi engeller.

```lua
hook.Add( "AcceptInput", "BlockLuaRun", function( ent, name, activator, caller, data )
    if ( ent:GetClass() == "lua_run" ) then
        return true
    end
end )
```

### Örnek

Kapılardaki Açma/Kapatma (Open/Close) girdisini engeller.

```lua
local DoorClasses = {
	["func_door"] = true,
	["func_door_rotating"] = true
}
local BlockedInputs = {
	["Open"] = true,
	["Close"] = true
}

hook.Add( "AcceptInput", "BlockDoors", function( ent, name, activator, caller, data )
    if ( BlockedInputs[name] and DoorClasses[ent:GetClass()] ) then
        return true
    end
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/GM:AcceptInput
