Quote:
Originally Posted by black_heart
how to make this code to dhud?
|
Download dhudmessage.inc and move it to includes folder. (Download link in the previous post)
After that compile this script:
PHP Code:
//dont forget to add include file at the top
include <dhudmessage>
// Spectating someone else?
if (id != ID_SHOWHUD)
{
// Show name, health, class, and ammo packs
set_dhudmessage(255, 255, 255, HUD_SPECT_X, HUD_SPECT_Y, 0, 6.0, 1.1, 0.0, 0.0, -1)
show_dhudmessage(ID_SHOWHUD, "%L %s^nHP: %d - %L %s - %L %d", ID_SHOWHUD, "SPECTATING", g_playername[id], pev(id, pev_health), ID_SHOWHUD, "CLASS_CLASS", class, ID_SHOWHUD, "AMMO_PACKS1", g_ammopacks[id])
}
else
{
// Show health, class and ammo packs
set_dhudmessage(red, green, blue, 0.00, 0.18, 0, 6.0, 1.1, 0.0, 0.0, -1)
show_dhudmessage(ID_SHOWHUD, "[%L: %d]^n[%L %s]^n[%L %d]", id, "ZOMBIE_ATTRIB1", pev(ID_SHOWHUD, pev_health), ID_SHOWHUD, "CLASS_CLASS", class, ID_SHOWHUD, "AMMO_PACKS1", g_ammopacks[ID_SHOWHUD])
}