General > Developers Corner
Please Halp! How to make motd Not closed for 15sec?
(1/1)
spec45as:
Hi, i tryed to do one thing - players, when join my server must read rules in motd, but they are close it at once. How to do: close button show only after 60 sec.? i tryed use timer.simple, but it doesn't work.
timer.Simple( 5,
local button = vgui.Create( "DButton", window ) --TIMER
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 ) )
)
Sorry for my english, it's not my home lang.
Aaron113:
Try this...
--- Code: ---timer.Simple( 5, function()
local button = vgui.Create( "DButton", window ) --TIMER
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 )
end)
--- End code ---
spec45as:
*i do 25 sec, not 5 in - timer.Simple( 5, function()
Now button will be show after 25sec, but MOTD will not show
riki137:
This was already suggested by me, but well, it's still not in new SVN. :'( :'( :'(
Navigation
[0] Message Index
Go to full version