list.Set

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

Açıklama

Belirtilen listedeki belirli bir konumu bir değere ayarlar.

Argümanlar

1 string identifier
Listenin tanımlayıcısı
2 any key
Listede ayarlanacak anahtar
3 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.

-- 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)

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 } )

Tüm sunucular · GmodTR Launcher · Rehber · GMod Wiki · GmodTR nedir? · Sunucu ekle · Discord