Raised This Month: $ Target: $400
 0% 

[ZPA] How to make this hud message ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
ChesterGazi
Junior Member
Join Date: Jun 2015
Old 06-21-2015 , 18:57   [ZPA] How to make this hud message ?
Reply With Quote #1

Hello, how to make this hud for humans - http://prikachi.com/images/963/8050963r.jpg
and this hud for zombies - http://prikachi.com/images/955/8050955Y.jpg

i post the source (Show Hud task)

PHP Code:
// Show HUD Task
public ShowHUD(taskid)
{
    static 
id
    id 
ID_SHOWHUD;

    
// Player died?
    
if (!g_isalive[id])
    {
        
// Get spectating target
        
id pev(idPEV_SPEC_TARGET)

        
// Target not alive
        
if (!g_isalive[id]) return;
    }
    
// Format classname
    
static class[32]//, red, green, blue
    
if (g_zombie[id]) // zombies
    
{
        if (
g_nemesis[id])
            
formatex(class, charsmax(class), "%L"ID_SHOWHUD"CLASS_NEMESIS")
        else if (
g_assassin[id])
            
formatex(class, charsmax(class), "%L"ID_SHOWHUD"CLASS_ASSASSIN")
        else
            
copy(class, charsmax(class), g_zombie_classname[id])
    }
    else 
// humans
    
{
        if (
g_survivor[id])
            
formatex(class, charsmax(class), "%L"ID_SHOWHUD"CLASS_SURVIVOR")
        else if (
g_sniper[id])
            
formatex(class, charsmax(class), "%L"ID_SHOWHUD"CLASS_SNIPER")
        else
            
formatex(class, charsmax(class), "%L"ID_SHOWHUD"CLASS_HUMAN")
    }
    
    
// Spectating someone else?
    
if (id != ID_SHOWHUD)
    {
        
// Show name, health, class, and ammo packs and armor
        
set_hudmessage(random(256),random(256),random(256), HUD_STATS_XHUD_STATS_Y06.01.10.00.0, -1)
        
ShowSyncHudMsg(ID_SHOWHUDg_MsgSync2"HP: %d || Class: %s || AP: %d || Armor: %d"id"ZOMBIE_ATTRIB1"pev(ID_SHOWHUDpev_health), ID_SHOWHUD"CLASS_CLASS",
        class, 
ID_SHOWHUD"AMMO_PACKS1"g_ammopacks[ID_SHOWHUD], ID_SHOWHUD"ARMOR"pev(ID_SHOWHUDpev_armorvalue))
    }
    else
    {
        if (
g_zombie[ID_SHOWHUD]) // zombies
        
{
            
// Show health, class and ammo packs and armor
            
set_hudmessage(255,218,185HUD_STATS_XHUD_STATS_Y06.01.10.00.0, -1)
            
ShowSyncHudMsg(ID_SHOWHUDg_MsgSync2"HP: %d || Class: %s || AP: %d"pev(ID_SHOWHUDpev_health), class, g_ammopacks[ID_SHOWHUD])
        }
        else
        {
            
// Show health, class and ammo packs and armor
            
set_hudmessage(0,0,255HUD_STATS_XHUD_STATS_Y06.01.10.00.0, -1)
            
ShowSyncHudMsg(ID_SHOWHUDg_MsgSync2"HP: %d || Armor: %d || Class: %s || AP: %d"pev(ID_SHOWHUDpev_health), pev(ID_SHOWHUDpev_armorvalue), class, g_ammopacks[ID_SHOWHUD])
        }
    }

__________________
:*
ChesterGazi is offline
Send a message via Skype™ to ChesterGazi
 



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 15:21.


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