Hello,
Iam searching for a derma menu script that shows all the servers from my community and a button to join that server.
i've 3 gmod servers now and i hope someone has this script and wants to share it with me (us)
Iam pretty noob at coding LUA so thats why i asked it here :p
Thanks,
Rickyboy12367
[CODE]if CLIENT then
local function MyMenu()
local DermaPanel = vgui.Create( "DFrame" )
DermaPanel:SetPos( 50,50 )
DermaPanel:SetSize( 200, 300 )
DermaPanel:SetTitle( "[B][YOUR TITLE HERE][/B]" )
DermaPanel:SetVisible( true )
DermaPanel:SetDraggable( true )
DermaPanel:ShowCloseButton( true )
DermaPanel:SetBackgroundBlur( true )
DermaPanel:Center() --Sets the frame position to center of the screen.
DermaPanel:MakePopup()
local DermaButton = vgui.Create( "DButton" )
DermaButton:SetParent( DermaPanel ) -- Set parent to our "DermaPanel"
DermaButton:SetText( "[B][TEXT ON THE BUTTON][/B]" )
DermaButton:SetPos( 25, 230 )
DermaButton:SetSize( 150, 50 )
DermaButton.DoClick = function ()
LocalPlayer():ConCommand("connect [B][SERVERS IP AND PORT HERE][/B]")
end
end
-- Makes a usermessage hook
usermessage.Hook("MyMenu", MyMenu)
else
-- Runs if its on the server.
-- Makes the client download the file
AddCSLuaFile()
-- function called MyMenu
function MyMenu( ply )
umsg.Start( "MyMenu", ply ) --Send the contents of "MyMenu" to the client
umsg.End() -- Ends usermessage (sends it to the client)
end --End the function
hook.Add("ShowSpare1", "GM:ShowSpare1", MyMenu)
end[/CODE]
Sorry, you need to Log In to post a reply to this thread.