Raised This Month: $51 Target: $400
 12% 

Hud Messages Sometimes Appear and Sometimes do Not


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
deadman909
Veteran Member
Join Date: Oct 2008
Old 04-02-2015 , 04:00   Hud Messages Sometimes Appear and Sometimes do Not
Reply With Quote #1

Hi. In the Event_DeathMsg my Hud messages that I appear only at random.
Can someone help me out.

The server gives the HP correctly how I want it so I know that it is reading the code.
But for some reason that Huds only appear whenever they want too. I tried regular hud and now dhud but no difference.

PHP Code:
public Event_DeathMsg( )
{
    new 
iKiller read_data);
    new 
iVictim read_data);
    new 
iHeadshot read_data);
    new 
iHSBonus get_pcvar_num(p_HSKillBonus)
    new 
iREGBonus get_pcvar_num(p_RegularKillBonus)
    
    if( 
iKiller && iVictim != iKiller )
    {
        new 
ServerMaxHP get_pcvar_nump_ServerMaxHp );
        new 
UserOriginalHP get_user_healthiKiller );
    
        new 
szVictimName32 ];
        
get_user_nameiVictimszVictimName31 );
        
        if( 
UserOriginalHP != ServerMaxHP )
        {
            
            if (
iHeadshot && UserOriginalHP iHSBonus ServerMaxHP )
            {
                
set_user_healthiKillerUserOriginalHP iHSBonus );
                
set_dhudmessage(0255100, -1.00.1501.05.00.10.1)
                
show_dhudmessage(iKiller"HEAD KILL: You have received en extra +%i HP for killing %s"iHSBonusszVictimName)
            }
            else if ( 
UserOriginalHP iREGBonus ServerMaxHP )
            {
                
set_user_healthiKillerUserOriginalHP iREGBonus );
                
set_dhudmessage(0255100, -1.00.1501.05.00.10.1)
                
show_dhudmessage(iKiller"You have received en extra +%i HP for Killing %s"iREGBonusszVictimName)
            }
            else
            {
                
set_user_healthiKillerServerMaxHP );
                
set_dhudmessage(0255100, -1.00.1501.05.00.10.1)
                
show_dhudmessage(iKiller"Your Health was set to the Servers Max HP Level of %i."ServerMaxHP)
            }
            
        }
        else
        {
            
set_dhudmessage(0255100, -1.00.1501.05.00.10.1)
            
show_dhudmessage(iKiller"No Bonus HP: Already reached servers Max HP Limit of %i."ServerMaxHP)
        }
    }

__________________

deadman909 is offline
Send a message via MSN to deadman909 Send a message via Yahoo to deadman909
Mitchell
~lick~
Join Date: Mar 2010
Old 04-02-2015 , 09:11   Re: Hud Messages Sometimes Appear and Sometimes do Not
Reply With Quote #2

This does not appear to be sourcemod at all.
Mitchell is offline
Old 04-02-2015, 09:36
Dr. Greg House
This message has been deleted by Dr. Greg House.
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 04-02-2015 , 10:11   Re: Hud Messages Sometimes Appear and Sometimes do Not
Reply With Quote #3

Quote:
Originally Posted by Mitchell View Post
This does not appear to be sourcemod at all.
Your correct, it's AMXX
__________________
WildCard65 is offline
deadman909
Veteran Member
Join Date: Oct 2008
Old 04-02-2015 , 18:02   Re: Hud Messages Sometimes Appear and Sometimes do Not
Reply With Quote #4

Sorry. Can someone remove thread.
__________________

deadman909 is offline
Send a message via MSN to deadman909 Send a message via Yahoo to deadman909
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 04-02-2015 , 20:06   Re: Hud Messages Sometimes Appear and Sometimes do Not
Reply With Quote #5

Quote:
Originally Posted by deadman909 View Post
Sorry. Can someone remove thread.
It's perfectly fine here, it's just not a great place to seek scripting support due to the limited audience.

I'll move it to the AMXX scripting forum.
__________________

Last edited by asherkin; 04-02-2015 at 20:06.
asherkin is offline
deadman909
Veteran Member
Join Date: Oct 2008
Old 04-02-2015 , 23:24   Re: Hud Messages Sometimes Appear and Sometimes do Not
Reply With Quote #6

Alright thanks. I also already tried separating it into set task to call out the huds but still same thing. Hmm can it just be that it is because I have a dedicated server were I'm testing this? Maybe in an actual server it might work? Anybody have any ideas?
__________________

deadman909 is offline
Send a message via MSN to deadman909 Send a message via Yahoo to deadman909
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:30.


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