Home / Forum / Discussion and Help for Gmod-Glua-Lua / HUD Tutorial for Nordahl Job Agenda Editor

HUD Tutorial for Nordahl Job Agenda Editor

profile avatar Girah
🎁 Buyer
📖 Posts: 2
↩️ Replies: 0
❤️ Reactions: 0
Girah Posted 1587770394 (Edited) (6518 views)
Script link : Job Agenda Editor

1. Basics: Understanding and modifying the basic HUD
2. Advanced: Having a fully customized agenda HUD

First of all: This Tutorial is very simple and basic for a minimal modification of the HUD according to your needs. Some notions will not be covered, so if you are missing something it will be up to you to work on it. But you should know what you need to do what you want.

1. Basics: Understanding and modifying the basic HUD

First of all, it is important to know that everything concerning the agenda HUD is only processed in the file :

Once in this file, go to lines 911 to 916.

Nordahl HUD Agenda Lua Code

- ScrW()-10,11 corresponds to the positioning of the text in x,y. -10 corresponding to x (so the more the value goes down to the negative, the more the text will be on the left) and 11 to y (the more the value goes up to the positive, the more the text will go down)

- Color(255,255,255) simply corresponds to the color of the displayed text.

- 2,1,1 are very interesting: it is the positioning of text :
- 1 : CENTER
Namely that the first number acts on the horizontal alignment, and the second vertical. The third one always leaves it at 1.
So, if you want to have a text perfectly centered and that can matter its content by always staying in the same place, I recommend the values 1,1,1.

Now you know everything you need to know about editing and placing text in your HUD. So you have all the cards in hand to switch from the basic HUD:

HUD modified

But you'll only get .otf, so get them converted to .tff here: https://convertio.co/fr/otf-ttf/.
Then you add this file in a fonts folder, itself stored in a resource folder. You will put this resource folder in the collection downloaded by the players.

You will now declare this famous new fact that you have just imported in your gmod. ( See https://wiki.facepunch.com/gmod/surface.CreateFont)

So you'll have this:

Lua Code Create font
⛔️ Sorry, you are not connected, join to leave a reaction


Sign in or register to reply