AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ABOUT HUD (https://forums.alliedmods.net/showthread.php?t=133390)

davidto1995 07-24-2010 17:29

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


i want a hud TUTORIAL:mrgreen::mrgreen::mrgreen:

nikhilgupta345 07-24-2010 17:55

Re: ABOUT HUD
 
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)
}
}


PattyBiena 07-24-2010 18:05

Re: ABOUT HUD
 
PHP Code:

set_hudmessage(redgreenbluePOSSXPOSSY)
show_hudmessage(index"Health: %d^nArmor: %d"get_user_health(index), get_user_armor(index)) 


drekes 07-24-2010 18:09

Re: ABOUT HUD
 
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])
    }



Bugsy 07-25-2010 00:16

Re: ABOUT HUD
 
This had been asked and answered multiple times. This may help http://forums.alliedmods.net/showthread.php?t=123800

infek 07-25-2010 02:40

Re: ABOUT HUD
 
AMXX Studio helps alot, Generators/Hudmessage Generator.

davidto1995 07-25-2010 03:17

Re: ABOUT HUD
 
thx a lot!


All times are GMT -4. The time now is 03:07.

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