ULX

Author Topic: Please Halp! How to make motd Not closed for 15sec?  (Read 2685 times)

0 Members and 3 Guests are viewing this topic.

Offline spec45as

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Please Halp! How to make motd Not closed for 15sec?
« 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.

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: Please Halp! How to make motd Not closed for 15sec?
« Reply #1 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)
« Last Edit: August 30, 2010, 05:13:25 PM by Aaron113 »

Offline spec45as

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: Please Halp! How to make motd Not closed for 15sec?
« Reply #2 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


Offline riki137

  • Newbie
  • *
  • Posts: 44
  • Karma: 0
  • lol wuttermelon
    • SapphireWebsites
Re: Please Halp! How to make motd Not closed for 15sec?
« Reply #3 on: September 15, 2010, 03:04:23 AM »
This was already suggested by me, but well, it's still not in new SVN.  :'( :'( :'(