AlliedModders

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

flamin 03-14-2010 10:48

hud message [HELP]
 
1 Attachment(s)
hi there i have this function and i want that when match start a hudmessage appear in the center top that say Match Live:

PHP Code:

public lo3_start()
{
       
exec_pug_config("yap-lo3.cfg")
       
set_task(get_pcvar_float(pug_cvar_lo3_delay),  "lo3_end")
       
hud_message
}


public 
lo3_end()
{
       
hud_message
       continue_gen_forward
(forward_id)
}

public 
hud_message()
{
        
set_hudmessage(025500.450.1500.0,360.00.00.00)
        
show_hudmessage(0"-- Macth is Live --")  


hi there i have this 3 functions i want my hudmessage stay for all lo3_Start and some more seconds

in hud funct i set him 360 seconds but still seeing the message for like 1 or 2 segs why ? HELP PLEASE!

Here ceases the code without amendments:

drekes 03-14-2010 11:03

Re: hud message [HELP]
 
try this, this is how i make hud's for xp mods and such

PHP Code:

public hud_message()
{
             
set_hudmessage(025500.450.1500.0,360.00.00.00)
             
show_hudmessage(0"-- Macth is Live --"

              
set_task(2.0"hud_message"0)



addicted2sex 03-14-2010 11:20

Re: hud message [HELP]
 
Quote:

Originally Posted by flamin (Post 1117115)
hi there i have this function and i want that when match start a hudmessage appear in the center top that say Match Live:

PHP Code:

public lo3_start()
{
       
exec_pug_config("yap-lo3.cfg")
       
set_task(get_pcvar_float(pug_cvar_lo3_delay),  "lo3_end")
       
hud_message
}


public 
lo3_end()
{
       
hud_message
       continue_gen_forward
(forward_id)
}

public 
hud_message()
{
        
set_hudmessage(025500.450.1500.0,360.00.00.00)
        
show_hudmessage(0"-- Macth is Live --")  


hi there i have this 3 functions i want my hudmessage stay for all lo3_Start and some more seconds

in hud funct i set him 360 seconds but still seeing the message for like 1 or 2 segs why ? HELP PLEASE!

Here ceases the code without amendments:

Cuz there are only 4 hud channels and if there's another plugin, using hud messages ... here's your answer. So the only way is to create a sync hud object or loop a timer with the hud message. This is an example with loop timer:


PHP Code:

public lo3_start() {
       
exec_pug_config("yap-lo3.cfg")
       
set_task(get_pcvar_float(pug_cvar_lo3_delay),  "lo3_end")
       
hud_message()
       
set_task(3.0"hud_message"951159//Re-showing the hud message in 3 seconds interval
}
public 
lo3_end() {
       
remove_task(951159)
       
continue_gen_forward(forward_id)
}
public 
hud_message() {
        
set_hudmessage(025500.450.1500.0,360.00.00.00)
        
show_hudmessage(0"-- Match is Live --")  



flamin 03-14-2010 17:14

Re: hud message [HELP]
 
Hi! Already fix the problem thank you a question how could place a little more below beca the "MATCH IS LIVE" leaves in the top how could put more to the center of the screen?

wrecked_ 03-17-2010 17:12

Re: hud message [HELP]
 
The X and Y axis are the 4th and 5th parameters of set_hudmessage.

flamin 03-17-2010 22:06

Re: hud message [HELP]
 
Thank you wrecked i have already settled ^^ at the moment i am working in the code that post in your tutorial but i have not been able to achieve you can help verifies please


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

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