Forum

Customize a standard HUD

Created 8th July 2010 @ 22:00

Add A Reply Pages: 1

Hi, i’d like to add last dmg dealt to my hud and when i move my crosshair over my teammate i’d like to have his HP displayed as a number. Can any1 help me with that?

Go to flames hud dload site, and you should find a guide how to customize huds there.

ell

(ETF2L Donator)

You can achieve this http://img130.imageshack.us/img130/128/dmgnums20.png like this:

HudDamageAccount.res file:

“Resource/UI/HudDamageAccount.res”
{
“CDamageAccountPanel”
{
“fieldName” “CDamageAccountPanel”
“xpos” “312”
“ypos” “246”
“wide” “50”
“tall” “50”
“text_x” “0”
“text_y” “0”
“delta_item_end_y” “0”
“PositiveColor” “255 255 0 255”
“NegativeColor” “255 255 0 255”
“delta_lifetime” “0”
“delta_item_font” “visitorSmall”
“delta_item_font_big” “visitorSmall”
}
“DamageAccountValue”
{
“ControlName” “CTFLabel”
“fieldName” “DamageAccountValue”
“xpos” “-6”
“ypos” “0”
“zpos” “2”
“wide” “20”
“tall” “6”
“visible” “1”
“enabled” “1”
“labelText” “%metal%”
“textAlignment” “left”
“fgcolor” “255 255 0 255”
“font” “visitorSmall”
}
“DamageAccountValueBG”
{
“ControlName” “CTFLabel”
“fieldName” “DamageAccountValue”
“xpos” “-5”
“ypos” “1”
“zpos” “1”
“wide” “20”
“tall” “6”
“visible” “1”
“enabled” “1”
“labelText” “%metal%”
“textAlignment” “left”
“fgcolor” “0 0 0 255”
“font” “visitorSmall”
}
}

hudlayout.res file:

CDamageAccountPanel
{
“fieldName” “CDamageAccountPanel”
“xpos” “0”
“ypos” “0”
“wide” “640”
“tall” “480”
“visible” “1”
“enabled” “1”
“PaintBackgroundType” “2”
}

ClientScheme.res file(under fonts):

“visitorSmall”
{
“1”
{
“name” “Visitor TT2 BRK”
“tall” “9”
“additive” “0”
“antialias” “0”
“range” “0x0000 0x017F” // Basic Latin, Latin-1 Supplement, Latin Extended-A
“outline” “0”
}

The last one is only necessary if you want a custom font. The font file needs to be installed (move the file to C:WINDOWSFonts), or loaded manually in ClientScheme.res. I did the former. Most custom huds already have this feature in some form. Check how they did it.


Last edited by ell,

Add A Reply Pages: 1