# list.Set

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

```lua
list.Set( string identifier, any key, any item )
```

## Açıklama

Belirtilen listedeki belirli bir konumu bir değere ayarlar.

## Argümanlar

1. [string](https://gmod.tr/wiki/string) **identifier**: Listenin tanımlayıcısı
2. [any](https://gmod.tr/wiki/any) **key**: Listede ayarlanacak anahtar
3. [any](https://gmod.tr/wiki/any) **item**: Listeye anahtar olarak ayarlanacak öğe

### Örnek

"Fisherman" adında, sınıf adı "npc_fisherman" ve varsayılan silahı "weapon_oldmanharpoon" olan bir NPC'yi doğma menüsünün (spawnmenu) NPC listesine ekler.

```lua
-- Lost Coast
list.Set("NPC", "npc_fisherman", {
	Name = "Fisherman",
	Class = "npc_fisherman",
	Weapons = { "weapon_oldmanharpoon" },
	Category = Category
})
```

### Örnek

Bağlam Menüsüne (C Menüsü) yeni bir "Masaüstü Aracı" (Desktop Widget) ekler. (Oyuncu Modeli seçimi bu şekilde eklenir)

```lua
list.Set( "DesktopWindows", "My Custom Context Menu Icon", {
	title = "Context Menu Icon",
	icon = "icon64/icon.png",
	init = function( icon, window )
		--Kodunuzu buraya yazın
	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/list.Set
