Raised This Month: $ Target: $400
 0% 

hud message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 11-26-2009 , 08:50   Re: hud message
Reply With Quote #1

It blinks because you set the exact amount for task and for the hud message time... you should add some time to the message... but still, if you want a long-term message on screen, you should use synchronized hud msg:
PHP Code:
#define LOOP_DELAY 1.0
 
new g_iSync
 
public plugin_init()
{
     
g_iSync CreateHudSyncObj()
     
set_task(LOOP_DELAY"loop"___"b")
}
 
public 
loop()
{
     
set_hudmessage(210105300.010.7800.0, (LOOP_DELAY 1.0), 0.50.5/* channel is ignored for sync hud msgs */
     
ShowSyncHudMsg(0g_iSync"Message")

Also, note that if you want more synchronized messages on one client you should create more sync objects (more g_iSync alike variables) or else they'll replace each-other

More details about the functions: http://www.amxmodx.org/funcwiki.php?...sync&go=search
__________________

Last edited by Hunter-Digital; 11-26-2009 at 08:52.
Hunter-Digital is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 11-27-2009 , 07:32   Re: hud message
Reply With Quote #2

Both codes are fine, they don't have effects... the message is just overlaying on the old one.

Quote:
Originally Posted by Hunter-Digital View Post
set_hudmessage(210, 105, 30, 0.01, 0.78, 0, 0.0, (LOOP_DELAY + 1.0), 0.5, 0.5) /* channel is ignored for sync hud msgs */
ShowSyncHudMsg(0, g_iSync, "Message")
Quote:
Originally Posted by worldspawn View Post
set_hudmessage(210, 105, 30,0.01,0.78,0, _, 2.0, 0.1, 0.1, 4 )
show_hudmessage(id,"blhablah")
wich _ is default value, meaning 0

It requires alot of precision to make a non-full color message looped and have the same color... it's no problem with full white, red, green, blue, yellow, purple, etc (messages that use minimum or maximum values, 0 or 255)

Quote:
Originally Posted by One View Post
i think he has more hudmessages & any of hudmessages willbe replaced by other messages.
that's not either... it's sync hud msg not a normal one, see what it says about it in the functions list

-----------------------------------------

Later edit:
All I could come up was a small pulsing text, test it out to see the effect:
PHP Code:
#include <amxmodx>
 
#define LOOP_DELAY 1.0
 
new g_iSync
 
public plugin_init()
{
      
g_iSync CreateHudSyncObj()
      
set_task(LOOP_DELAY"loop"___"b")
}
 
public 
loop()
{
      
set_hudmessage(210105300.010.7800.0LOOP_DELAY 0.10.250.25/* channel is ignored for sync hud msgs */
      
ShowSyncHudMsg(0g_iSync"Test message")

You can also adjust the pulse speed... change the duration and fade in/out to higher values for wider pulse and lower values for quicker pulse
__________________

Last edited by Hunter-Digital; 11-27-2009 at 07:46. Reason: added pulsing hud msg code
Hunter-Digital is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:38.


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