AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   What value will move HUD message a little bit upper? (https://forums.alliedmods.net/showthread.php?t=335396)

GlobalPlague 12-01-2021 06:53

What value will move HUD message a little bit upper?
 
Hello. I would like to know what value will move the HUD info message a little bit upper.

So, this is the value I currently use:

Code:

// HUD messages
const Float:HUD_EVENT_X = -1.0
const Float:HUD_EVENT_Y = 0.17
const Float:HUD_INFECT_X = 0.05
const Float:HUD_INFECT_Y = 0.45
const Float:HUD_SPECT_X = -1.0
const Float:HUD_SPECT_Y = 0.8
const Float:HUD_STATS_X = -1.00
const Float:HUD_STATS_Y = 0.9

At the value of "-1.00", the ZP's HUD info message is at the center low of the screen, meaning the HUD message is right above the timer that shows how much time is left before the end of the round.

Now, I want to know how to move the HUD message a little bit upper, because i added more information to the HUD info message and now the HUD shows more information, and now the extra HUD, which is part of the ZP's HUD info message, covers the timer that shows how much time is left before the end of the round. In other words, the ZP's HUD info message must be moved a little bit upper in order to no longer cover the timer.

So, what value will move the HUD message upper? I tried several different combinations of numbers, but it didn't happen. All values i tried moved the message to the left or to the right, but not upper.

amirwolf 12-01-2021 07:27

Re: What value will move HUD message a little bit upper?
 
Just change these
HTML Code:

const Float:HUD_STATS_X = 0.02
const Float:HUD_STATS_Y = 0.9

If you do not find the position you are looking for
use this
https://forums.alliedmods.net/showthread.php?t=2054

HamletEagle 12-01-2021 14:59

Re: What value will move HUD message a little bit upper?
 
Use amxx studio, it has a tool to generate & position hudmessages.

GlobalPlague 12-02-2021 14:45

Re: What value will move HUD message a little bit upper?
 
Quote:

Originally Posted by HamletEagle (Post 2764786)
Use amxx studio, it has a tool to generate & position hudmessages.

Yes, I know. But the AMXX Studio generates only simple HUD messages, and it can't help me with complex HUD messages.

I will give you photos, so you can understand me better.

This is how the ZP's info HUD looked like BEFORE I introduced the changes: https://pasteboard.co/YOT5aW31vPJt.png

This is how the ZP's info HUD looks like now: https://pasteboard.co/EodCYB1jYUZK.png

So, the following line:

"Health: 150 || Class: Human || Money: 0 || Armor: 0"

should move a little bit upper in order the following line:

"XP: 1706/2000 | Level: 8/30: SWAT"

to go to the same place where the following line is now:

"Health: 150 || Class: Human || Money: 0 || Armor: 0"

By moving the upper line a little bit upper, the lower line will move upper automatically, because both lines are part of the same HUD message function.

Do you understand what I'm saying? Sorry for my bad English.

HamletEagle 12-03-2021 03:00

Re: What value will move HUD message a little bit upper?
 
What you just said makes no sense. You use the amxx studio hud generator to positon the hud - the set_hudmessage line. Then you display whatever message you want, no matter how complex with show_hudmessage which you already have(and is the message you want to move).

GlobalPlague 12-04-2021 04:54

Re: What value will move HUD message a little bit upper?
 
Quote:

Originally Posted by HamletEagle (Post 2764914)
What you just said makes no sense. You use the amxx studio hud generator to positon the hud - the set_hudmessage line. Then you display whatever message you want, no matter how complex with show_hudmessage which you already have(and is the message you want to move).

You are right. I was wrong. Yes, I was aware of the AMXX-Studio's HUD message generator function, but I didn't know that I can use the cursor of the mouse to position the HUD message exactly where I want. I discovered that I can use the cursor just a few minutes ago.

Yes, the HUD Generator helped me to understand what values I need to use in order to position the HUD at the place where I want it to be.

Problem solved.

Thanks.


All times are GMT -4. The time now is 06:58.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.