AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Sync HUDmsg show status( zp ) (https://forums.alliedmods.net/showthread.php?t=187663)

tei1995 06-16-2012 09:09

Sync HUDmsg show status( zp )
 
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.

Liverwiz 06-16-2012 13:23

Re: Sync HUDmsg show status( zp )
 
what is your set_hudmessage function call?

<VeCo> 06-16-2012 13:31

Re: Sync HUDmsg show status( zp )
 
Maybe there are too many messages on the screen and that's why they disappear.

tei1995 06-17-2012 07:51

Re: Sync HUDmsg show status( zp )
 
Only one.
set_hudmessage(0,255,0,HUD_X,HUD_Y,0.0,6.0,0. 0,0.0,-1)

hornet 06-17-2012 07:57

Re: Sync HUDmsg show status( zp )
 
Show the real code.

tei1995 06-18-2012 03:37

Re: Sync HUDmsg show status( zp )
 
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"")



Liverwiz 06-18-2012 11:29

Re: Sync HUDmsg show status( zp )
 
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.

tei1995 06-19-2012 00:19

Re: Sync HUDmsg show status( zp )
 
I wil try. Thanks


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

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