local DermaPanel = vgui.Create( "DFrame" )
DermaPanel:SetPos( 250,250 )
DermaPanel:SetSize( 500,50 )
DermaPanel:SetTitle( "Alex's Admin RCON Console" )
DermaPanel:ShowCloseButton( true )
DermaPanel:SetVisible( false )
DermaPanel:MakePopup()
function check_message(ply, msg, bool)
if msg == "/menu" then
ply:ConCommand("open_rcon_console\n")
end
end
hook.Add("PlayerSay", "check_message_of_player", check_message)
local DermaText = vgui.Create( "DTextEntry", DermaPanel )
DermaText:SetPos( 20,25 )
DermaText:SetTall( 20 )
DermaText:SetWide( 450 )
DermaText:SetEnterAllowed( true )
DermaText.OnEnter = function()
RunConsoleCommand("-"..DermaText:GetValue().."-!" )
DermaPanel:SetVisible( false )
ChatPrint("Console Command -! EXECUTED!" )
end
function open_test_vgui()
DermaPanel:SetVisible(true)
end
concommand.Add("open_rcon_console", open_rcon_console)
end