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

ABOUT HUD


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
davidto1995
Member
Join Date: Jul 2010
Location: hong kong
Old 07-24-2010 , 17:29   ABOUT HUD
Reply With Quote #1

how can i set the hud message display forever(juz like in zp4.3,the health,class and ammopacks)


i want a hud TUTORIAL
davidto1995 is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 07-24-2010 , 17:55   Re: ABOUT HUD
Reply With Quote #2

Code:
Public plugin_init()
{
register_plugin(w,e)
Register_logevent("round_start", 2, "1=RoundStart")
}

Public round_start()
{
set_hudmessage(parameters here)
For(new i=1;i>0;i++)
{
show_hudmessage(parameters here)
}
}

Last edited by nikhilgupta345; 07-24-2010 at 18:02.
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
PattyBiena
BANNED
Join Date: Jul 2010
Location: Argentina
Old 07-24-2010 , 18:05   Re: ABOUT HUD
Reply With Quote #3

PHP Code:
set_hudmessage(redgreenbluePOSSXPOSSY)
show_hudmessage(index"Health: %d^nArmor: %d"get_user_health(index), get_user_armor(index)) 
PattyBiena is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 07-24-2010 , 18:09   Re: ABOUT HUD
Reply With Quote #4

this is the hud from zombie plague. You can edit that to your needs.
PHP Code:
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], redgreenblue
    
    
if (g_zombie[id]) // zombies
    
{
        
red 200
        green 
250
        blue 
0
        
        
if (g_nemesis[id])
            
formatex(class, charsmax(class), "%L"ID_SHOWHUD"CLASS_NEMESIS")
        else
            
copy(class, charsmax(class), g_zombie_classname[id])
    }
    else 
// humans
    
{
        
red 0
        green 
0
        blue 
255
        
        
if (g_survivor[id])
            
formatex(class, charsmax(class), "%L"ID_SHOWHUD"CLASS_SURVIVOR")
        else
            
formatex(class, charsmax(class), "%L"ID_SHOWHUD"CLASS_HUMAN")
    }
    
    
// Spectating someone else?
    
if (id != ID_SHOWHUD)
    {
        
// Show name, health, class, and ammo packs
        
set_hudmessage(255255255HUD_SPECT_XHUD_SPECT_Y06.01.10.00.0, -1)
        
ShowSyncHudMsg(ID_SHOWHUDg_MsgSync2"%L %s^nHP: %d - %L %s - %L %d"ID_SHOWHUD"SPECTATING"g_playername[id], pev(idpev_health), ID_SHOWHUD"CLASS_CLASS", class, ID_SHOWHUD"AMMO_PACKS1"g_ammopacks[id])
    }
    else
    {
        
// Show health, class and ammo packs
        
set_hudmessage(redgreenblueHUD_STATS_XHUD_STATS_Y06.01.10.00.0, -1)
        
ShowSyncHudMsg(ID_SHOWHUDg_MsgSync2"%L: %d - %L %s - %L %d"id"ZOMBIE_ATTRIB1"pev(ID_SHOWHUDpev_health), ID_SHOWHUD"CLASS_CLASS", class, ID_SHOWHUD"AMMO_PACKS1"g_ammopacks[ID_SHOWHUD])
    }

__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-25-2010 , 00:16   Re: ABOUT HUD
Reply With Quote #5

This had been asked and answered multiple times. This may help http://forums.alliedmods.net/showthread.php?t=123800
__________________
Bugsy is offline
infek
Senior Member
Join Date: May 2009
Location: Behind you
Old 07-25-2010 , 02:40   Re: ABOUT HUD
Reply With Quote #6

AMXX Studio helps alot, Generators/Hudmessage Generator.
__________________
"Domo Arigato, Mr. Roboto!"
PM me if you want to know a secret
infek is offline
davidto1995
Member
Join Date: Jul 2010
Location: hong kong
Old 07-25-2010 , 03:17   Re: ABOUT HUD
Reply With Quote #7

thx a lot!
davidto1995 is offline
Reply


Thread Tools
Display Modes

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 05:26.


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