Hi, I am currently trying to add some commands to my scoreboard just for ease of use really..
However I'm having a little trouble trying to add the final touches. I have an Admin sub menu, within this sub menu I want to have another sub menu, however I have no idea how I would go about adding this sub menu.
local ply = self.Player
if ply:IsValid() then
surface.PlaySound("buttons/button9.wav")
local options = DermaMenu()
options:AddOption("Copy Name", function() SetClipboardText(ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/user_edit.png")
options:AddOption("Copy SteamID", function() SetClipboardText(ply:SteamID()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/tag_blue.png")
options:AddOption("Open Profile", function() ply:ShowProfile() surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/world.png")
options:AddSpacer()
local adminop,subimg = options:AddSubMenu("Admin") subimg:SetImage("icon16/lorry.png")
-- Another SubMenu "Teleport"
adminop:AddOption("Bring", function() RunConsoleCommand("ulx","bring",ply:Nick()) surface.PlaySound("buttons/button9.wav") end)
adminop:AddOption("Go To", function() RunConsoleCommand("ulx","goto",ply:Nick()) surface.PlaySound("buttons/button9.wav") end)
adminop:AddOption("TP", function() RunConsoleCommand("ulx","teleport",ply:Nick()) surface.PlaySound("buttons/button9.wav") end)
-- Another SubMenu "Force Spectator"
adminop:AddOption("Enable", function() RunConsoleCommand("ulx","fspec",ply:Nick()) surface.PlaySound("buttons/button9.wav") end)
adminop:AddOption("Disable", function() RunConsoleCommand("ulx","unspec",ply:Nick()) surface.PlaySound("buttons/button9.wav") end)
-- Another SubMenu "Slay Queue"
adminop:AddOption("Remove Slay Next Round", function() RunConsoleCommand("ulx","slaynr",ply:Nick()) surface.PlaySound("buttons/button9.wav") end)
adminop:AddOption("RDM", function() RunConsoleCommand("ulx","slaynr",ply:Nick(), "RDM") surface.PlaySound("buttons/button9.wav") end)
adminop:AddOption("Attempted RDM", function() RunConsoleCommand("ulx","slaynr",ply:Nick(), "Attempted RDM") surface.PlaySound("buttons/button9.wav") end)
adminop:AddOption("False KOS", function() RunConsoleCommand("ulx","slaynr",ply:Nick(), "False KOS") surface.PlaySound("buttons/button9.wav") end)
adminop:AddOption("Traitor Baiting", function() RunConsoleCommand("ulx","slaynr",ply:Nick(), "Traitor Baiting") surface.PlaySound("buttons/button9.wav") end)
-- Another SubMenu "Slay"
adminop:AddOption("Slay", function() RunConsoleCommand("ulx","slay",ply:Nick()) surface.PlaySound("buttons/button9.wav") end)
adminop:AddOption("RDM", function() RunConsoleCommand("ulx","slay",ply:Nick(), "RDM") surface.PlaySound("buttons/button9.wav") end)
adminop:AddOption("Attempted RDM", function() RunConsoleCommand("ulx","slay",ply:Nick(), "Attempted RDM") surface.PlaySound("buttons/button9.wav") end)
adminop:AddOption("False KOS", function() RunConsoleCommand("ulx","slay",ply:Nick(), "False KOS") surface.PlaySound("buttons/button9.wav") end)
adminop:AddOption("Traitor Baiting", function() RunConsoleCommand("ulx","slay",ply:Nick(), "Traitor Baiting") surface.PlaySound("buttons/button9.wav") end)
-- Another SubMenu "Gag"
adminop:AddOption("Enable", function() RunConsoleCommand("ulx","gag",ply:Nick()) surface.PlaySound("buttons/button9.wav") end)
adminop:AddOption("Disable", function() RunConsoleCommand("ulx","gag",ply:Nick()) surface.PlaySound("buttons/button9.wav") end)
-- Another SubMenu "Mute"
adminop:AddOption("Enable", function() RunConsoleCommand("ulx","mute",ply:Nick()) surface.PlaySound("buttons/button9.wav") end)
adminop:AddOption("Disable", function() RunConsoleCommand("ulx","unmute",ply:Nick()) surface.PlaySound("buttons/button9.wav") end)
-- Another SubMenu "Gimp"
adminop:AddOption("Enable", function() RunConsoleCommand("ulx","gimp",ply:Nick()) surface.PlaySound("buttons/button9.wav") end)
adminop:AddOption("Disable", function() RunConsoleCommand("ulx","ungimp",ply:Nick()) surface.PlaySound("buttons/button9.wav") end)
-- Another SubMenu "Ban"
adminop:AddOption("FBan", function() RunConsoleCommand("xgui","fban",ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/delete.png")
adminop:AddOption("XBan", function() RunConsoleCommand("xgui","xban",ply:Nick()) surface.PlaySound("buttons/button9.wav") end):SetImage("icon16/delete.png")
-- Another SubMenu "Kick"
adminop:AddOption("RDM", function() RunConsoleCommand("ulx","kick",ply:Nick(),"You've have been kicked for RDM.") surface.PlaySound("buttons/button9.wav") end)
adminop:AddOption("Attempted RDM", function() RunConsoleCommand("ulx","kick",ply:Nick(),"You've have been kicked for Attempted RDM.") surface.PlaySound("buttons/button9.wav") end)
adminop:AddOption("False KOS", function() RunConsoleCommand("ulx","kick",ply:Nick(),"You've have been kicked for False KOS.") surface.PlaySound("buttons/button9.wav") end)
adminop:AddOption("Traitor Baiting", function() RunConsoleCommand("ulx","kick",ply:Nick(),"You've have been kicked for Traitor Baiting.") surface.PlaySound("buttons/button9.wav") end)
adminop:AddOption("Being a pain", function() RunConsoleCommand("ulx","kick",ply:Nick(),"You've have been kicked for being a pain.") surface.PlaySound("buttons/button9.wav") end)
adminop:AddOption("Spawn", function() RunConsoleCommand("ulx","spawn",ply:Nick()) surface.PlaySound("buttons/button9.wav") end)
adminop:AddOption("Karma", function() RunConsoleCommand("ulx","karma", ply:Nick(), "1000", "Has had their Karma reset to 1000") surface.PlaySound("buttons/button9.wav") end)
options:Open()
end
end
As you can see the places where I have inserted a comment is where I propose to have another sub menu. Any help would be appreciated! Thanks