Raised This Month: $ Target: $400
 0% 

Sync HUDmsg show status( zp )


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tei1995
Senior Member
Join Date: Feb 2011
Location: VietNam
Old 06-16-2012 , 09:09   Sync HUDmsg show status( zp )
Reply With Quote #1

Anyone can tell me why sync hud msg disappear when player keep firing/drawing weapon?
I use set_task and use flag "b" to show player hp by sync hudmsg.
__________________

Hatsune Miku~
tei1995 is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 06-16-2012 , 13:23   Re: Sync HUDmsg show status( zp )
Reply With Quote #2

what is your set_hudmessage function call?
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-16-2012 , 13:31   Re: Sync HUDmsg show status( zp )
Reply With Quote #3

Maybe there are too many messages on the screen and that's why they disappear.
__________________
<VeCo> is offline
tei1995
Senior Member
Join Date: Feb 2011
Location: VietNam
Old 06-17-2012 , 07:51   Re: Sync HUDmsg show status( zp )
Reply With Quote #4

Only one.
set_hudmessage(0,255,0,HUD_X,HUD_Y,0.0,6.0,0. 0,0.0,-1)
__________________

Hatsune Miku~
tei1995 is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 06-17-2012 , 07:57   Re: Sync HUDmsg show status( zp )
Reply With Quote #5

Show the real code.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
tei1995
Senior Member
Join Date: Feb 2011
Location: VietNam
Old 06-18-2012 , 03:37   Re: Sync HUDmsg show status( zp )
Reply With Quote #6

here my code:
PHP Code:
new g_MsgSync,g_MsgSync2,g_MsgSync3g_MsgSync4

public plugin_init()
{
        
// some register function here

        
g_MsgSync CreateHudSyncObj()
    
g_MsgSync2 CreateHudSyncObj()
    
g_MsgSync3 CreateHudSyncObj()
        
g_MsgSync4 CreateHudSyncObj()

     
set_task(1.0,"showHUD",_,_,_,"b")    
}


// Show HUD Task
public showHUD(taskid)
{
    for(new 
id 1idget_maxplayers();id++)
    {
        if(!
is_user_alive(id))    continue
        
// Format classname
        
static class[32], redgreenblue
        
        
if (g_zombie[id]) // zombies
        
{
            
red 200
            green 
250
            blue 
0
            
            
if (g_nemesis[id])
                
formatex(class, charsmax(class), "%L"id"CLASS_NEMESIS")
            else
                
copy(class, charsmax(class), g_zombie_classname[id])
        }
        else 
// humans
        
{
            
red 0
            green 
255
            blue 
0
            
            
if (g_survivor[id])
                
formatex(class, charsmax(class), "%L"id"CLASS_SURVIVOR")
            else
                
formatex(class, charsmax(class), "%L"id"CLASS_HUMAN")
        }
        
        
// Show health, class and ammo packs
        
set_hudmessage(redgreenblueHUD_STATS_XHUD_STATS_Y06.02.00.00.0, -1)
        
ShowSyncHudMsg(idg_MsgSync3"%L: %d^n%L %s^n%L %d"id"ZOMBIE_ATTRIB1"pev(idpev_health), id"CLASS_CLASS", class, id"AMMO_PACKS1"g_ammopacks[id])
        
    }
    
set_hudmessage(255255255, -1.00.0106.01.10.00.0, -1)
    
ShowSyncHudMsg(0g_MsgSync2"")

__________________

Hatsune Miku~
tei1995 is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 06-18-2012 , 11:29   Re: Sync HUDmsg show status( zp )
Reply With Quote #7

Quote:
Code:
set_hudmessage(255, 255, 255, -1.0, 0.01, 0, 6.0, 1.1, 0.0, 0.0, -1) 
    ShowSyncHudMsg(0, g_MsgSync2, "")
try getting rid of that.

if that doesn't work maybe set a reliable channel (like 3 or something instead of -1)

Other than that i don't see anything that should do that.....unless you have a CurWeapon hook with hudmessages in it.
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
tei1995
Senior Member
Join Date: Feb 2011
Location: VietNam
Old 06-19-2012 , 00:19   Re: Sync HUDmsg show status( zp )
Reply With Quote #8

I wil try. Thanks
__________________

Hatsune Miku~
tei1995 is offline
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 06:08.


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