Hey guys, I was wondering if there are any working MOTD plugins or Evolve plugins for Garrys mod 13 besides using ULX. Any?
[code]if CLIENT then
concommand.Add("Website",function(pl,cmd,args)
local Frame = vgui.Create("DFrame")
Frame:SetSize(ScrW() - 20, ScrH() - 20)
Frame:Center()
Frame:SetTitle("Website")
Frame:MakePopup()
Frame:SetMouseInputEnabled(true)
local html = vgui.Create("DHTML", Frame)
html:SetPos(5,25)
html:SetSize(ScrW() - 30, ScrH() - 30)
html:OpenURL("http://website.com/")
end)
end
if SERVER then
hook.Add("PlayerSay", "ChatHook", function(Player, Text, Public)
if Text[1] == "!" then
Text = Text:lower()
if Text == "!website" then
Player:ConCommand("Website")
return ""
end
end
end)
end
hook.Add("PlayerInitialSpawn", "OpenWebsite", function(ply)
ply:ConCommand("Website")
end)[/code]
With this you'll be able to display a webpage by typing in !website. Of course the web page should pop up as soon as you spawn. You may change 'website' to something more suiting such as 'motd'
Simply create a lua file and place it in your lua/autorun directory.
Thanks to [url=http://facepunch.com/member.php?u=439348]TheDivinity[/url] and [url=http://facepunch.com/member.php?u=449703]UniqueGuy[/url]
Thanks man! Got it working great.
Sorry, you need to Log In to post a reply to this thread.