# Custom SpawnMenu

- **İngilizce aslı:** https://wiki.facepunch.com/gmod/Custom_SpawnMenu
- **Çeviri tarihi:** 2025-11-05

## Kendi SpawnMenu'mü nasıl yaparım?

### Bu, en azından, eklenmiş tüm sekmelere erişmeyi gerektirir. Bunu şu şekilde yapabilirsiniz:

```lua
for k, v in SortedPairsByMemberValue( spawnmenu.GetCreationTabs(), "Order" ) do
    PrintTable( v )
    print( k ) -- Sekme adı
end
```

### Örnek

```lua
local menu = vgui.Create( "DFrame" )
menu:SetSize( 1000, 550 )
menu:Center()
menu:MakePopup()

local sheet = vgui.Create( "DPropertySheet", menu )
sheet:Dock( FILL )

for k, v in SortedPairsByMemberValue( spawnmenu.GetCreationTabs(), "Order" ) do
    local panel = v.Function()
    panel:SetParent( sheet )

    sheet:AddSheet( k, panel, v.Icon )
end
```

**Çıktı:** ![](https://gmod.tr/api/uploads/wiki/fe5b6355e1fb578c7c21.png)

### Sırada Araç (Tool) kısmına erişmeniz gerekiyor:

```lua
for _, tool in ipairs( spawnmenu.GetTools() ) do
	for _, category in ipairs( tool.Items ) do
		print( category.Text ) -- Kategori adı

		for _, item in ipairs( category ) do
			print( item.Text ) -- Aracın kendi adı
		end
	end
end
```

En zor kısım zaten yapıldı, geriye sadece bu şemalara VGUI kısmını eklemek ve SpawnMenu'nüzün keyfini çıkarmak kalıyor.

Özel çalışma örnekleri: [The New SpawnMenu](https://steamcommunity.com/sharedfiles/filedetails/?id=3594346953) ve [FreSpawnmenu](https://steamcommunity.com/sharedfiles/filedetails/?id=2613708971)

- [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/Custom_SpawnMenu
