Author Topic: Quick Question About HUD  (Read 2979 times)

0 Members and 1 Guest are viewing this topic.

Offline Valgoid

  • Full Member
  • ***
  • Posts: 103
  • Karma: -15
  • Wanna Be Lua King
Quick Question About HUD
« on: July 11, 2014, 10:27:54 PM »
For my server I want it to display my server name on the top left hand corner of the players screens.

Can anyone help me with this?

Offline Avoid

  • Full Member
  • ***
  • Posts: 142
  • Karma: 42
Re: Quick Question About HUD
« Reply #1 on: July 12, 2014, 06:24:46 AM »
Hey there,
try using this:

Code: [Select]
draw.DrawText( GetHostName( ), "Default", x, y * 0.01, Color( 255, 255, 255, 120 ), TEXT_ALIGN_LEFT );

Avoid

Offline Valgoid

  • Full Member
  • ***
  • Posts: 103
  • Karma: -15
  • Wanna Be Lua King
Re: Quick Question About HUD
« Reply #2 on: July 12, 2014, 09:01:40 AM »
That looks good, but what if we wanted to out an outline, so the text is white and outline is grey, you k ow what i mean so it looks better

Offline Cobalt

  • Full Member
  • ***
  • Posts: 216
  • Karma: 44
  • http://steamcommunity.com/id/__yvl/
Re: Quick Question About HUD
« Reply #3 on: July 12, 2014, 10:55:04 AM »
draw.SimpleTextOutlined( GetHostName(), "Trebuchet24", 5, 5, color_white, TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP, 1, color_black )

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Quick Question About HUD
« Reply #4 on: July 12, 2014, 02:04:13 PM »
Valgoid, in case you're not already when these two are showing you the actual code, you should really look up the functions they're showing you, so you know what the info inside them mean, using the Gmod wiki.
draw.DrawText
draw.SimpleTextOutlined
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Valgoid

  • Full Member
  • ***
  • Posts: 103
  • Karma: -15
  • Wanna Be Lua King
Re: Quick Question About HUD
« Reply #5 on: July 14, 2014, 12:33:10 PM »
I cant get it to work...

Offline Avoid

  • Full Member
  • ***
  • Posts: 142
  • Karma: 42
Re: Quick Question About HUD
« Reply #6 on: July 14, 2014, 01:14:24 PM »
Hello,
that is not much of an explanation for your problem..Where exactly are you stuck?
Try adding the line Cobalt posted in a clientsided file, preferably in the HUDPaint section! :)

Avoid
« Last Edit: July 14, 2014, 01:17:50 PM by Avoid »

Offline Valgoid

  • Full Member
  • ***
  • Posts: 103
  • Karma: -15
  • Wanna Be Lua King
Re: Quick Question About HUD
« Reply #7 on: July 17, 2014, 12:17:39 PM »
I'm very confused, can you please write the whole script out? I honestly dont know whats going on.

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: Quick Question About HUD
« Reply #8 on: July 17, 2014, 12:48:11 PM »
I'm very confused, can you please write the whole script out? I honestly dont know whats going on.

Sorry, but that just makes me suspicious of you. Do you really know lua?
Out of the Garry's Mod business.

Offline Valgoid

  • Full Member
  • ***
  • Posts: 103
  • Karma: -15
  • Wanna Be Lua King
Re: Quick Question About HUD
« Reply #9 on: July 24, 2014, 10:10:11 PM »
Very basic lua, yes but for some reason this script isnt working