Raised This Month: $ Target: $400
 0% 

Sync HUDmsg show status( zp )


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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