AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Help] stack these hud writes one above the other on the crt (https://forums.alliedmods.net/showthread.php?t=17793)

Riddick51 09-09-2005 06:09

[Help] stack these hud writes one above the other on the crt
 
i have two plugins which write to the players screen.

current objective: make the following screen write
Code:
set_hudmessage(White[0],White[1],White[2],0.05,0.65,2,0.02,6.0,0.01,0.1,2)     show_hudmessage(id,MK_msg[MK_lvl])
appear one line above the following screen write:
Code:
set_hudmessage(0, 100, 200, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2); show_hudmessage(0, stkmessages[level], name);

also, both of them flush left (aligned left), just one above the other. my request is so that one of them won't overwrite the other.

thx ;o

v3x 09-09-2005 07:17

Try
Code:
new szMessage[256]; new len = format(szMessage,255,"%s",MK_msg[MK_lvl]); new len += format(szMessage[len],255-len,"^n%s",stkmessages[level],name); show_hudmessage(0,szMessage);

XxAvalanchexX 09-09-2005 15:42

a) v3x, they're two different plugins, so they each have to be done seperately.

b) They're both on channel #2 (the last parameter), use a different channel for one of them.

c) It may be impossible to get them to line up perfectly on every resolution.

Riddick51 09-10-2005 03:36

what i did was put a ^n in front of one of the sets of strings. knocked it down one line and things look great. not very sophisticated i know, but ima noob.

what v3x put is what i want to gravitate to. right now, ive got about three plugins that loop thru every player. i'd rather cut out the overhead and have one plugin doing:

streak kills
multi-kills within 3 secs each

Johnny got his gun 09-10-2005 05:38

Maybe make a plugin that handles/manages all AMXx HUD writings, using the semi-fresh interplugin API?
It could manage the few HUD channels there are.
Calls to it would not need to use specified HUD channels, that would be managed by that plugin itself.
A HUD msg would be printed to a channel which isn't used, and this could differ for each client.
Something like a layer similar to the client cvar one.

v3x 09-10-2005 12:17

Quote:

Originally Posted by XxAvalanchexX
a) v3x, they're two different plugins, so they each have to be done seperately.

Oh, I didn't notice that part of his post.


All times are GMT -4. The time now is 14:32.

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