Raised This Month: $ Target: $400
 0% 

hud message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
worldspawn
Senior Member
Join Date: Aug 2009
Location: Russia, Yekaterinburg
Old 11-26-2009 , 08:09   hud message
Reply With Quote #1

hello, how can i make a hud message that will never disappear?
i tried this
PHP Code:
set_task(2.0"show_hud"id__"b");

public 
show_hud(id)
{
    
set_hudmessage(21010530,0.01,0.78,0_2.00.10.1
    
show_hudmessage(id,"blhablah"

but text blinks...i need some code without any cycles or repeats
is it possible?
worldspawn is offline
Send a message via ICQ to worldspawn Send a message via Skype™ to worldspawn
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 #2

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 #3

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
worldspawn
Senior Member
Join Date: Aug 2009
Location: Russia, Yekaterinburg
Old 11-26-2009 , 09:00   Re: hud message
Reply With Quote #4

thx), going to test
worldspawn is offline
Send a message via ICQ to worldspawn Send a message via Skype™ to worldspawn
worldspawn
Senior Member
Join Date: Aug 2009
Location: Russia, Yekaterinburg
Old 11-26-2009 , 14:31   Re: hud message
Reply With Quote #5

It doesn't work how i want..
every two seconds new message appears over old and it looks ugly
Attached Thumbnails
Click image for larger version

Name:	Untitled-2.png
Views:	545
Size:	14.3 KB
ID:	54172  
worldspawn is offline
Send a message via ICQ to worldspawn Send a message via Skype™ to worldspawn
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 11-27-2009 , 07:13   Re: hud message
Reply With Quote #6

Quote:
Originally Posted by worldspawn View Post
It doesn't work how i want..
every two seconds new message appears over old and it looks ugly
Try using LOOP_DELAY + 0.1 and set fade in and out to 0.1 or 0.05
__________________
Hunter-Digital is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 11-27-2009 , 07:25   Re: hud message
Reply With Quote #7

Quote:
Originally Posted by Hunter-Digital View Post
Try using LOOP_DELAY + 0.1 and set fade in and out to 0.1 or 0.05

your code is fine.. look at this.. he need the default hud style as 0.

Code:
effects types: 
0 = fade in/fade out 
1 = flickery credits 
2 = write out (training room)

so, he need something like this set_hudmessage(210, 105, 30, 0.01, 0.78, 0, 6.0, 5.0 )
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 11-27-2009 , 07:30   Re: hud message
Reply With Quote #8

i think he has more hudmessages & any of hudmessages willbe replaced by other messages.

try for first to check it by deactivating the imessage & scrollmsg in plugins.ini.

after this test the hudmessages...
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 11-26-2009 , 14:35   Re: hud message
Reply With Quote #9

(LOOP_DELAY + 1.0) -> LOOP_DELAY, or add + 0.1
__________________
xPaw is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 11-26-2009 , 15:23   Re: hud message
Reply With Quote #10

maybe this ?

PHP Code:
set_task(3.0"show_hud")

public 
show_hud()
{
    
    
set_hudmessage(RED,GREEN,BLUE1.00.2020.0210.00.010.1, -1);
    
show_hudmessage(0"This is my awesome hud message!")
   

__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
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