I am just trying to make a simpler UI for ULX commands as some admins on a server I am staff on are complaining about how awkward it is and I just offered to make a simple menu for it, but I have one issue I am trying to make this menu appear whenever the player types "!adminpanel". But it is refusing to actually appear I have been told by a couple basic LUA devs it should appear, of course this is just the start but I don't really wanna make it when I don't know what it will look like. This file is located in "garrysmod/lua/autorun" and I don't know if that actually has to do with anything but just in case. All I want is little pointers as to what the issue is. :/
local frame = vgui.Create("DFrame")
frame:SetSize(1000,700)
frame:Center()
frame:SetVisible(true)
frame:MakePopup()
concommand.Add( "adminpanel", frame )
hook.Add( "PlayerSay", "Killurself", function( ply, text, public )
text = string.lower( text ) -- Make the chat message entirely lowercase
if ( text == "!adminpanel" ) then
frame
return ""
end
end )