AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Permanent HUD (https://forums.alliedmods.net/showthread.php?t=164784)

dreamedward 08-15-2011 17:44

Permanent HUD
 
hey, guys
I was wondering how can i make a HUD that shows all round and at round start it dissapears?

APPLESAUCE 08-15-2011 18:42

Re: Permanent HUD
 
PHP Code:

public start_displaying()
{
    
set_task(1.0"display_msg"2356__"b"
    
//function display_msg will be called every second
}

public 
display_msg()
{
    
//this function will display hud message that lasts 1 second every time it's called
    
set_hudmessage(02550, -1.00.8806.01.0)
    
show_hudmessage(information here)


If you need the round start disappearing, let me know.

This code should enable you to have a permanent hud message, but it won't disappear at the start of a round (yet.) Keep in mind, the HUD can be overwritten by another HUD message if it displays afterwards.

dreamedward 08-16-2011 03:30

Re: Permanent HUD
 
I would like it to dissapear at round end. What do you mean by overwritten by another HUD message? If another HUD shows it will dissapear?

fysiks 08-16-2011 04:10

Re: Permanent HUD
 
Quote:

Originally Posted by dreamedward (Post 1533630)
I would like it to dissapear at round end.

To remove it you would hook round end and remove_task(2356).


Quote:

Originally Posted by dreamedward (Post 1533630)
What do you mean by overwritten by another HUD message? If another HUD shows it will dissapear?

Yes, it's possible because there a limited number of HUD messages that can be shown at one time. However, this one will come back and possibly make other HUD messages disappear.

One option is to use HUD Sync messages which will help minimize the risk of being over written but won't be a guarantee.

dreamedward 08-16-2011 05:38

Re: Permanent HUD
 
Can't it be done like in ZP? In ZP it has a permanent hud of Health, Class, Ammo Packs and there are again hud messages like Humans defeated the plague, No one win, XXX's brain has been eaten and etc.

fysiks 08-16-2011 05:41

Re: Permanent HUD
 
HUD sync messages.

dreamedward 08-16-2011 06:03

Re: Permanent HUD
 
Thanks!


All times are GMT -4. The time now is 09:11.

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