AlliedModders

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

iCap 10-08-2007 06:43

show hud forever
 
is this possible? im new to coding and i stormed up an idea and it needs to have the hud message show up forever, can anyone give me an example?

thanks in advance!

purple_pixie 10-08-2007 07:00

Re: show hud forever
 
Tricky.

It may just be possible to hook the show_hudmessage, and in that you could check the channel - if it's the same as you're displaying on, and not the same text, display yours instead.

And probably set a task to show it again once it dissappears ...

I don't really know hud messages. Just a suggestion.

Alka 10-08-2007 08:22

Re: show hud forever
 
All you can do is to set a task! make the hudmessage stay 5 sec and set task after 5 sec to show hudmessage again.

alien 10-09-2007 09:38

Re: show hud forever
 
This will show your message to everyone and it will stay. It's also quite useful to have it like this. Imagine situation where you want to change the message. You just set it up according to some values and it will reappear changed in few seconds.

PHP Code:

public plugin_init()
  {
    ...
    
set_task(5.0"neverending_hud_message"1234""0"b");

    
// 1234 is a task code - you can use it to stop task from executing or find-out whether it exists etc.
    
...
  }



public 
neverending_hud_message()
  {
    
set_hudmessage(128128128, -1.00.5000.05.10.00.51);
    
show_hudmessage(0"I love you and want to stay on your screen forever!");
    return 
PLUGIN_CONTINUE;
  } 


Podunk 10-09-2007 17:05

Re: show hud forever
 
I found menu's work too and you can multicolor different parts of the same call


All times are GMT -4. The time now is 16:08.

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