AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   hud message (https://forums.alliedmods.net/showthread.php?t=110185)

worldspawn 11-26-2009 08:09

hud message
 
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?

Hunter-Digital 11-26-2009 08:50

Re: hud message
 
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

worldspawn 11-26-2009 09:00

Re: hud message
 
thx), going to test

worldspawn 11-26-2009 14:31

Re: hud message
 
1 Attachment(s)
It doesn't work how i want..
every two seconds new message appears over old and it looks ugly

xPaw 11-26-2009 14:35

Re: hud message
 
(LOOP_DELAY + 1.0) -> LOOP_DELAY, or add + 0.1

One 11-26-2009 15:23

Re: hud message
 
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!")
   



worldspawn 11-26-2009 15:35

Re: hud message
 
@xPaw
Quote:

Originally Posted by Hunter-Digital
It blinks because you set the exact amount for task and for the hud message time

@One
it will only show hud message for 10 secs, but i need hud which won't disappear at all

One 11-26-2009 15:38

Re: hud message
 
this is my scrollmsg. which i use and i have a permanent hud text.

PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new effect

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
set_task(3.0"kirkir1")
    
//set_task(1.0, "modInfo", 0, "", 0, "b");
    // Add your code here...
}
new 
x,y,z
public kirkir1()
{
    
1
    y 
5
    z 
+5
    
if( >= 255)
    {
        
1
    
}
    if(
>= 255)
    
y1
    
if(>= 255)
    
z=1
    kirkir
()
}
public 
effecting()
{
    
set_task(5.0,"the_effects")
}
public 
the_effects()
{
    
effect++
    if(
effect<=1)
    {
        
effect 1
    
}
    else if (
effect >= 2)
    {
        
effect 2
    
}
}
public 
kirkir()
{
    
    
set_hudmessage(x,y,z1.00.20effect0.0210.00.010.1, -1);
    
show_hudmessage(0"W^nW^nW^n.^nH^nA^nR^nD^nS^nT^nY^nL^nE^n-^nE^nS^nP^nO^nR^nT^nS^n.^nD^nE")
    
    
set_task(3.0"kirkir1")


http://forums.alliedmods.net/showpos...2&postcount=38

ehha 11-26-2009 17:39

Re: hud message
 
This is what I currently use:
Code:
public HudDisplay(id) {     set_hudmessage(50, 100, 250, 0.01, 0.878, 0, 0.0, 1.0, 0.0);     show_hudmessage(id, "...", ...); }
With a task of 1.0 seconds, it flickers just a little bit.
This should do it for 2.0 seconds:
Code:
set_hudmessage(50, 100, 250, 0.01, 0.878, 0, 0.0, 2.0, 0.0);

worldspawn 11-27-2009 03:50

Re: hud message
 
i don't want flicking or blinking message, just permanent beautiful message


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

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