ULX

Author Topic: Is It possible to change "OK" on bottom of motd?  (Read 2801 times)

0 Members and 2 Guests are viewing this topic.

Offline Storm

  • Full Member
  • ***
  • Posts: 220
  • Karma: 4
Is It possible to change "OK" on bottom of motd?
« on: January 01, 2014, 01:55:55 AM »
Players have to hit "ok" at the bottom of the ulx motd to enter the server. I would like to change the "ok" to "I have read the rules and agree to them". Is there anyway to do this?

Offline sabo

  • Full Member
  • ***
  • Posts: 136
  • Karma: 2
  • Hello :)
    • The Elite Gaming
Re: Is It possible to change "OK" on bottom of motd?
« Reply #1 on: January 01, 2014, 05:56:06 AM »
Go to the motdmenu.lua

At start you have this code:

Code: [Select]
function ulx.showMotdMenu()
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( "ULX 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 )
if not isUrl then
html:SetHTML( file.Read( "ulx_motd.txt", "DATA" ) )
else
html:OpenURL( url )
end
end

Change the

Code: [Select]
button:SetText( "Close" )
to

Code: [Select]
button:SetText( "I have read the rules and agree to them." )
And you should be done.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Is It possible to change "OK" on bottom of motd?
« Reply #2 on: January 01, 2014, 06:14:43 AM »
It would be better to place a big huge noticeable BY CLICKING OK YOU AGREE TO THE FOLLOWING at the top of your rules page.
We rarely recommend editing of original ULX files in order to prevent issues later if we ever update sections of that file (and if using SVN, checkout won't ever update that file)
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline ULXGmodFan

  • Newbie
  • *
  • Posts: 28
  • Karma: 0
Re: Is It possible to change "OK" on bottom of motd?
« Reply #3 on: January 02, 2014, 12:57:16 AM »
I remember Assmod had a delay of a few seconds before you could click Ok.

I wuold be interested in knowing how to do this

Offline Storm

  • Full Member
  • ***
  • Posts: 220
  • Karma: 4
Re: Is It possible to change "OK" on bottom of motd?
« Reply #4 on: January 02, 2014, 01:47:21 AM »
I do have something to that effect in large italics at the top of the motd. It is widely ignored. I will try this thank you! Some players say because of their PC's the don't have the ability to see the motd or call it up. Do you know if this is legit?

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: Is It possible to change "OK" on bottom of motd?
« Reply #5 on: January 02, 2014, 02:11:22 AM »
I do have something to that effect in large italics at the top of the motd. It is widely ignored. I will try this thank you! Some players say because of their PC's the don't have the ability to see the motd or call it up. Do you know if this is legit?

I leave a message at the bottom of the motd which says

"Message the admins with 'The detective is a traitor. KOS me.' to obtain 100 points."

It's a nice way of weeding out who reads it or not.

And regarding the excuse that they can't see the motd because of their PCs.
That is complete BS. If their computer can't view a text file, they wouldn't be
able to play Gmod.

And see this post if you want to disable the X button on the motd.
http://forums.ulyssesmod.net/index.php/topic,4767.msg20080.html#msg20080
Out of the Garry's Mod business.

Offline Storm

  • Full Member
  • ***
  • Posts: 220
  • Karma: 4
Re: Is It possible to change "OK" on bottom of motd?
« Reply #6 on: January 02, 2014, 05:26:32 AM »
Thanks. I changed the motdmenu file and it worked great. I also resized the button itself so the additional text would show.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Is It possible to change "OK" on bottom of motd?
« Reply #7 on: January 02, 2014, 10:17:05 AM »
delay of a few seconds before you could click Ok.

I wuold be interested in knowing<clip
Search for "motd delay" from front of forum found this
http://forums.ulyssesmod.net/index.php/topic,4929.0.html
Though it's old, it's a good lua start.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Storm

  • Full Member
  • ***
  • Posts: 220
  • Karma: 4
Re: Is It possible to change "OK" on bottom of motd?
« Reply #8 on: January 02, 2014, 10:45:26 AM »
The only reason  I wouldnt put the delay on my servers is because I have a lot of regulars who have already read the rules and would get really annoyed.