Would this work correctly?
[CODE]local donatorfeatures = vgui.Create( "DFrame" )
frame:SetSize( 988, 536 )
frame:SetTitle( "Donator features!" )
frame:SetVisible( true )
frame:SetDraggable( true )
frame:Center( true )
local html = vgui.Create( "DHTML" , frame )
html:Dock( FILL )
html:SetHTML( "http://i.imgur.com/68iXgJl.png" )
html:SetAllowLua( true )
frame:MakePopup()
-- Image VGUI code up here
hook.Add( "OnPlayerChat", "DonatorFeatures", function( ply, text )
if ( text == "!donatorfeatures" ) then
RunConsoleCommand( "donatorfeatures" )
end
end )[/CODE]
EDIT: Got bored.
[img]http://gyazo.com/53cc9131a1c0f64faf2366b186bab510.png[/img]
[code]
function donator()
local frame = vgui.Create( "DFrame" )
frame:SetSize( 1001, 560 )
frame:SetTitle( "Donator features!" )
frame:SetVisible( true )
frame:SetDraggable( true )
frame:Center( true )
function frame:Paint()
Derma_DrawBackgroundBlur(self)
// Makes the derma panel rounded.
draw.RoundedBox( 2, 0, 0, frame:GetWide(), frame:GetTall(), Color(0, 0, 0, 200) )
// Header Color.
draw.RoundedBox( 2, 0, 0, frame:GetWide(), 23, Color(0,140,191,200) )
end
// I don't even?
--local html = vgui.Create( "DHTML" , frame )
--html:Dock( FILL )
--html:SetHTML( "http://i.imgur.com/68iXgJl.png" )
--html:SetAllowLua( true )
frame:MakePopup()
HTMLTest = vgui.Create("HTML")
HTMLTest:SetParent(frame)
HTMLTest:Dock( FILL )
HTMLTest:SetPos(50,50)
HTMLTest:SetSize(ScrW() - 100, ScrH() - 100)
HTMLTest:OpenURL("http://i.imgur.com/68iXgJl.png")
end
concommand.Add("DonatorFeatures", donator)
hook.Add( "OnPlayerChat", "DonatorFeatures", function( ply, text )
if ( text == "!donatorfeatures" ) then
RunConsoleCommand( "DonatorFeatures" )
end
end )
[/code]
[QUOTE=Positive;45596706]EDIT: Got bored.
[img]http://gyazo.com/53cc9131a1c0f64faf2366b186bab510.png[/img]
[code]
function donator()
local frame = vgui.Create( "DFrame" )
frame:SetSize( 1001, 560 )
frame:SetTitle( "Donator features!" )
frame:SetVisible( true )
frame:SetDraggable( true )
frame:Center( true )
function frame:Paint()
Derma_DrawBackgroundBlur(self)
// Makes the derma panel rounded.
draw.RoundedBox( 2, 0, 0, frame:GetWide(), frame:GetTall(), Color(0, 0, 0, 200) )
// Header Color.
draw.RoundedBox( 2, 0, 0, frame:GetWide(), 23, Color(0,140,191,200) )
end
// I don't even?
--local html = vgui.Create( "DHTML" , frame )
--html:Dock( FILL )
--html:SetHTML( "http://i.imgur.com/68iXgJl.png" )
--html:SetAllowLua( true )
frame:MakePopup()
HTMLTest = vgui.Create("HTML")
HTMLTest:SetParent(frame)
HTMLTest:Dock( FILL )
HTMLTest:SetPos(50,50)
HTMLTest:SetSize(ScrW() - 100, ScrH() - 100)
HTMLTest:OpenURL("http://i.imgur.com/68iXgJl.png")
end
concommand.Add("DonatorFeatures", donator)
hook.Add( "OnPlayerChat", "DonatorFeatures", function( ply, text )
if ( text == "!donatorfeatures" ) then
RunConsoleCommand( "DonatorFeatures" )
end
end )
[/code][/QUOTE]
Thank you!
[QUOTE=Positive;45596706]EDIT: Got bored.[/QUOTE]
The header height is actually 24, and paint has the args of width and height already so you don't have to call that function.
[lua]
function frame:Paint(w,h)
Derma_DrawBackgroundBlur(self)
// Makes the derma panel rounded.
draw.RoundedBox(2, 0, 0, w, h, Color(0, 0, 0, 200))
// Header Color.
draw.RoundedBox(2, 0, 0, w, 24, Color(0,140,191,200))
end
[/lua]
Where would I put this .lua file?
I put it all in one .lua file, not sure if that's the right thing to do.
I also put it in garrysmod/lua/autorun/client but it isn't working.
edit:
even tried putting it in garrysmod/lua/autorun
tried putting it in garrysmod/lua/autorun/server
also tried putting it in ^ but also adding the below coding in to it.
[CODE]
if ( SERVER ) then
end[/CODE]
No matter what I do I can't seem to get it working.
[QUOTE=Ganoal;45597082]Where would I put this .lua file?
I put it all in one .lua file, not sure if that's the right thing to do.
I also put it in garrysmod/lua/autorun/client but it isn't working.
edit:
even tried putting it in garrysmod/lua/autorun
tried putting it in garrysmod/lua/autorun/server
also tried putting it in ^ but also adding the below coding in to it.
[CODE]
if ( SERVER ) then
end[/CODE]
No matter what I do I can't seem to get it working.[/QUOTE]
lua/autorun/client
Ahh okay.
Sorry, you need to Log In to post a reply to this thread.