# GM:VariableEdited

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

```lua
GM:VariableEdited( Entity ent, Player ply, string key, string val, table editor )
```

## Açıklama

Bir Entity üzerindeki bir değişken düzenlendiğinde çağrılır (Özellikleri Düzenle... menüsü tarafından çağrılır). Daha fazla bilgi için [Editable Entities](https://gmod.tr/wiki/Editable_Entities) sayfasına bakın.

> **UYARI:** Bu hook, bir değişken değiştirildikten sonra değil, bir değişkeni değiştirmek için çağrılır

## Argümanlar

1. [Entity](https://gmod.tr/wiki/Entity) **ent**: Düzenlenmekte olan entity
2. [Player](https://gmod.tr/wiki/Player) **ply**: Düzenlemeyi yapan oyuncu
3. [string](https://gmod.tr/wiki/string) **key**: Değişkenin adı
4. [string](https://gmod.tr/wiki/string) **val**: Daha sonra uygun türüne dönüştürülecek olan bir string olarak yeni değer
5. [table](https://gmod.tr/wiki/table) **editor**: [Entity:NetworkVar](https://gmod.tr/wiki/Entity:NetworkVar) içinde tanımlanan düzenleme tablosu

### Örnek

base/gamemode/variable_edit.lua dosyasından

```lua
function GM:VariableEdited( ent, ply, key, val, editor )
    if ( !IsValid( ent ) ) then return end
    if ( !IsValid( ply ) ) then return end
    local CanEdit = hook.Run( "CanEditVariable", ent, ply, key, val, editor )
    if ( !CanEdit ) then return end
    ent:EditValue( key, val )
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:VariableEdited
