I've been trying to work out a way of getting the content/prop iconslist or DTileLayout (spawnicons) from the SpawnMenu so that I can edit/remove them in my gamemode code. I haven't been able to do it though, despite looking through the sandbox code and spending several hours on it.
The furthest I've managed to get is receiving the Creation Menu, and any steps taken after that have lead me into a dead end (all of the contents I've found ended up empty or were unrelated)
Here's what I've got:
[lua]function CustomSpawnMenu()
local testspawnmenudata = spawnmenu
local testspawnmenu = vgui.Create( "SpawnMenu" )
testspawnmenu:MakePopup()
for k, v in pairs(testspawnmenu:GetChildren()) do
if v.ClassName == "CreationMenu" then
local PropMenu = v:GetActiveTab()
local CreationContents = v:GetChildren()
PrintTable(CreationContents[1]:GetChildren()) -- <-- only this one has children
print(CreationContents[2].ClassName) -- all of these return nil
print(CreationContents[3].ClassName)
print(CreationContents[4].ClassName)
print(CreationContents[5].ClassName)
print(CreationContents[6].ClassName)
print(CreationContents[7].ClassName)
print(CreationContents[8].ClassName)
print(CreationContents[9].ClassName)
for k, v in pairs(CreationContents) do
for ktwo, vtwo in pairs(v:GetChildren()) do
vtwo:SetVisible(false)
end
end
end
end
return false
end
hook.Add("SpawnMenuOpen", "Custom Rp SpawnMenu", CustomSpawnMenu)[/lua]
Any help with this would be greatly appreciated.
I still haven't gotten any help with this. Let me know if you need any more information.
BUMP
Sorry, you need to Log In to post a reply to this thread.