Frame with website at launch?

Hello, i need help i tried to do something like it shows up a frame and inside of the frame my website is here its “jeuxvideo.com
Like the player can close the frame and its in the middle of the screen like when the player joins he have the frame showed up?

Help?

Thanks,

  • Le Flambikitue

during loading or what?

No it is like when the player joins it is showing up and he can close it

If you’re using ULX as admin mod you can make it very simple in the settings tab. If you don’t use ULX simple search on google for a ”website motd” or something like that.

I don’t use ULX i use ASSMOD

>assmod

i don’t think assmod has a motd, you might look around gmod.org or the workshop,
but i doubt there will be a motd-script there.

Here is the MOTD script I use with Assmod. I think it’s pulled out of ULX but I’m not sure. I found it on here a while ago.

Just change this line html:OpenURL(“http://yourwebsitehere.com”)

[lua]
if CLIENT then
concommand.Add(“Website”,function(pl,cmd,args)
local window = vgui.Create( “DFrame” )
if ScrW() > 640 then – Make it larger if we can.
window:SetSize( ScrW()*0.9, ScrH()*0.9 )
else
window:SetSize( 640, 480 )
end
window:Center()
window:SetTitle( “MOTD” )
window:SetVisible( true )
window:MakePopup()

local html = vgui.Create( "HTML", window )

local button = vgui.Create( "DButton", window )
button:SetText( "Close" )
button.DoClick = function() window:Close() end
button:SetSize( 100, 40 )
button:SetPos( (window:GetWide() - button:GetWide()) / 2, window:GetTall() - button:GetTall() - 10 )

html:SetSize( window:GetWide() - 20, window:GetTall() - button:GetTall() - 50 )
html:SetPos( 10, 30 )
html:OpenURL("http://yourwebsitehere.com")
end)

end

if SERVER then
hook.Add(“PlayerSay”, “MyMotdHook”, function(Player, Text, Public)
if Text[1] == “!” then
Text = Text:lower()
if (Text == “!motd” || Text == “!rules”) then
Player:ConCommand(“Website”)
return “”
end
end
end)
end

hook.Add(“PlayerInitialSpawn”, “OpenWebsite”, function(ply)
ply:ConCommand(“Website”)
end)
[/lua]

That’s pretty useful.