AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] HUD message to appear forever (https://forums.alliedmods.net/showthread.php?t=54443)

BioI-Iazard 04-25-2007 21:13

[HELP] HUD message to appear forever
 
how do i make a hud message appear forever?
lets say this one....

set_hudmessage(255, 0, 0, -1.0, 0.0, 0, 6.0, 12.0)
show_hudmessage(id, "yo")

thnx in advance

bwgrubbs1 04-25-2007 22:26

Re: HUD message to appear forever
 
First off why would you want some HUD message to display forever...

but anyways I would just say set the time to whatever your roundtime is set to. For example lets say your server is set to mp_roundtime 5 for 5 minute rounds...

Code:
set_hudmessage(255, 0, 0, -1.0, 0.0, 0, 6.0, 300.0) show_hudmessage(id, "yo")

I'm no expert but that would last for 5 minutes and re-appear as soon as the round restarted.

Ryu2877 04-25-2007 22:51

Re: HUD message to appear forever
 
if you want,

maybe:

1. set a loop to show it

2. by dint of "menu system"

3. by dint of half-life's "help system"

Styles 04-25-2007 23:40

Re: HUD message to appear forever
 
i would just do a thing like...
Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "test"
#define VERSION "1.0"
#define AUTHOR "test"


public plugin_init() {
        register_plugin(PLUGIN, VERSION, AUTHOR)
        set_task(10.0,"funtime",69,"",0,"b");
}

public funtime()
{
        set_hudmessage(57, 199, 71, -1.0, 0.23, 0, 6.0, 12.0)
        show_hudmessage(0, "Lets have sexy funtime!")       
}


BioI-Iazard 04-26-2007 00:19

Re: HUD message to appear forever
 
ok ima stick with this code cause its works.
the only problem is it doesnt stay on forever like it disappears wen another hud message is displayed and reappears wen it goes away. even wen its in a totally different place.
how do i fix that?

Quote:

Originally Posted by styles (Post 469801)
i would just do a thing like...
Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "test"
#define VERSION "1.0"
#define AUTHOR "test"


public plugin_init() {
        register_plugin(PLUGIN, VERSION, AUTHOR)
        set_task(10.0,"funtime",69,"",0,"b");
}

public funtime()
{
        set_hudmessage(57, 199, 71, -1.0, 0.23, 0, 6.0, 12.0)
        show_hudmessage(0, "Lets have sexy funtime!")       
}



Styles 04-26-2007 01:36

Re: HUD message to appear forever
 
I don't really think so, Thats just a thing that happens with huds to my knowledge.
What you might be able to do is change the set_task(10.0,"funtime",69,"",0,"b"); to like set_task(1.0,"funtime",69,"",0,"b");

That might make it reappear faster if it does disappear.

Day 04-26-2007 02:11

Re: HUD message to appear forever
 
Then it will block all other messages :) You should display this HUD message in separate thread (if it possible)...

BioI-Iazard 04-26-2007 02:21

Re: HUD message to appear forever
 
what do you mean display in seperate thread?
i see what u mean by the other hud messages being blocked cause thats what is happening right now...
how do i fix that?

Day 04-26-2007 02:32

Re: [HELP] HUD message to appear forever
 
I'm not sure, but i think hud messages have layers. You should place your HUD message on another layer, so your message won't erase all others.

Code:
set_hudmessage ( red=200, green=100, blue=0, Float:x=-1.0,  Float:y=0.35, effects=0, Float:fxtime=6.0, Float:holdtime=12.0,  Float:fadeintime=0.1, Float:fadeouttime=0.2, channel=4 )

I think the "channel" is what you are looking for...

BioI-Iazard 04-26-2007 02:37

Re: [HELP] HUD message to appear forever
 
i think this might work :)
correction..................
u are a genius!!!
works perfect. thanks alot man


All times are GMT -4. The time now is 18:05.

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