Ulysses

General => Developers Corner => Topic started by: spec45as on August 30, 2010, 05:39:03 AM

Title: Please Halp! How to make motd Not closed for 15sec?
Post by: spec45as on August 30, 2010, 05:39:03 AM
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.
Title: Re: Please Halp! How to make motd Not closed for 15sec?
Post by: Aaron113 on August 30, 2010, 05:06:21 PM

Try this...
Code: [Select]
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)
Title: Re: Please Halp! How to make motd Not closed for 15sec?
Post by: spec45as on August 31, 2010, 12:33:12 AM
*i do 25 sec, not 5 in - timer.Simple( 5, function()
Now button will be show after 25sec, but MOTD will not show
(http://s02.radikal.ru/i175/1008/fa/155f95264cadt.jpg) (http://radikal.ru/F/s02.radikal.ru/i175/1008/fa/155f95264cad.jpg.html)
Title: Re: Please Halp! How to make motd Not closed for 15sec?
Post by: riki137 on September 15, 2010, 03:04:23 AM
This was already suggested by me, but well, it's still not in new SVN.  :'( :'( :'(