ULX

Author Topic: Ulx !servers window thing  (Read 1503 times)

0 Members and 1 Guest are viewing this topic.

Offline Professor_Smiley

  • Newbie
  • *
  • Posts: 45
  • Karma: -24
Ulx !servers window thing
« on: September 26, 2015, 03:43:22 AM »
Hey there, I am learning to code lua and have modified your motd a bit to fit my server.
Here it is

As you can see I made two buttons side by side one closes the motd and one disconnects the player. Impressive huh?

Now I want to somehow create a window that looks like this:


The buttons will make the player execute this console command "connect", "insert longip here"
I am not a very good coder and I have no idea how to do this. I can modify the size of the window but I don't really know anything else such as how to place buttons in specific locations and text and such.

Besides, I need a second motdmenu.lua or something like that and I have no idea if to copy the module and paste it in the same folder or make a different addons folder...
 :(
Can someone explain to me what to do and how all this works? ;DThank you
« Last Edit: September 26, 2015, 07:31:20 AM by JamminR »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Ulx !servers window thing
« Reply #1 on: September 26, 2015, 07:42:17 AM »
We appreciate creativity.
I moved your post here to Developers corner as this section of the forum is intended for such coding questions.
Because you had the full size of the images, I added height/width to your image tags so as to better fit when browsing.

Personally, I've not dabbled in Gmod gui (or even Xgui) enough to assist you other than what I can read / understand / comprehend* when looking at our XGUI code and the Gmod wiki in general.
* sometimes, comprehending and explanations are a good addition and all that are needed

However, your ideas sounded like something I've seen before, and I found two server hoppers in our releases section.
I saw quickly that both have GUI menus, and you may want to look at thier code and learn from them.
(or even, save yourself time and simply use either on your server)

Server "Hopper" + Platform
and
Simple Hopper


"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Professor_Smiley

  • Newbie
  • *
  • Posts: 45
  • Karma: -24
Re: Ulx !servers window thing
« Reply #2 on: September 28, 2015, 01:30:42 AM »
Nice! That was exactly was I was looking for. Saves me time and effort coding it.
And it's called a hopper... lol

Thanks for the links. Kudos to you