AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Moving set_hudmessage Text (https://forums.alliedmods.net/showthread.php?t=48579)

Roach 12-15-2006 02:13

Moving set_hudmessage Text
 
I'm not too sure I fully understand this line of code, but im going to give it a shot...

I'm working with the seemingly abandoned plugin server_rules (http://forums.alliedmods.net/showthread.php?t=7703) and attempting to modify it to fit my needs...as well as to get a greater understand of how the text display system works.

And herein I am stuck. I am understanding that the first three numbers in this line of code:
Code:

set_hudmessage(255, 0, 0, -1.0, 0.01)
Are for the actual color of the hudmessage (rrr,ggg,bbb respectively). However, im not too sure how the final two numbers work. Any explination on that? I understand that the snippet I just put up is for red, left centered, but I dont quite understand how the coordinates work for the text (which I assume are the final two numbers).

I know that this line puts the text in the upper left hand corner. I want to bring the text down so that if a player joins the black bar from the spectator menu isnt blocking off the first 4-5 rules.

Code:

set_hudmessage( DISPLAYCOLOR[0], DISPLAYCOLOR[1], DISPLAYCOLOR[2], 0.05, 0.05, 2, 0.01, nDisplayTime, 0.01, 0.1, 4 )
But then I see lines like this on a similar plugin...and my brain doesnt comprehend.

Code:

set_hudmessage ( 200, 150, 0, 0.02, 0.25, 2, 0.1, get_cvar_float("rules_hudmessage_time"), 0.05, 1.0, 1)
I know that the hudmessage coordinates for this code display it in somewhat of the center of the screen.

Edit:

Well shit, im a moron...I didnt realize that there is a message text generator in the studio...

I feel like a total dumbass.

jim_yang 12-15-2006 02:22

Re: Moving set_hudmessage Text
 
get a amxx studio, http://prdownloads.sourceforge.net/a...l.zip?download
inside there's a hud message generator. it has a picture. drag the text in that picture then see the coord x,y

Roach 12-15-2006 02:31

Re: Moving set_hudmessage Text
 
Yeah, i saw that as soon as I went back into the studio to figure that out..

Now I understand that the final 2 are x,y coordinates...which makes sense.


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

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