Search for
Code:
register_dictionary("zombie_plague.txt")
And paste this below it
Code:
register_dictionary("zombie_classes.txt")
Create the zombie_classes.txt file in addons/amxmodx/data/lang and replace the ShowHud function (should be in line 8525) with this.
Code:
// Show HUD Task
public ShowHUD(taskid)
{
static id
id = ID_SHOWHUD;
// Player died?
if (!g_isalive[id])
{
// Get spectating target
id = pev(id, PEV_SPEC_TARGET)
// Target not alive
if (!g_isalive[id]) return;
}
// Format classname
static class[32], red, green, blue
if (g_zombie[id]) // zombies
{
red = 255
green = 255
blue = 0
if (g_nemesis[id])
{
formatex(class, charsmax(class), "%L", ID_SHOWHUD, "CLASS_NEMESIS")
}
else
{
ArrayGetString(g_zclass_name, g_zombieclass[id], class, charsmax(class))
new key[64]
formatex(key, charsmax(key), "ZOMBIE(%s)", class)
replace_all(key, charsmax(key), " ", "-")
if (GetLangTransKey(key) != TransKey_Bad)
{
formatex(class, charsmax(class), "%L", ID_SHOWHUD, key)
}
}
//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_dhudmessage(255, 255, 255, HUD_SPECT_X, HUD_SPECT_Y, 0, 6.0, 1.1, 0.0, 0.0)
show_dhudmessage(ID_SHOWHUD, "[%L %s]^n[HP: %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_hudmessage(red, green, blue, HUD_STATS_X, HUD_STATS_Y, 0, 6.0, 1.1, 0.0, 0.0)
show_hudmessage(ID_SHOWHUD, "[%L: %d] [%L %s] [%L %d]", id, "ZOMBIE_ATTRIB1", pev(ID_SHOWHUD, pev_health), ID_SHOWHUD, "CLASS_CLASS", class, ID_SHOWHUD, "AMMO_PACKS1", g_ammopacks[ID_SHOWHUD])
}
}
Now just add the translations for the classes in the zombie_classes.txt file you created. The format is
Quote:
ZOMBIE(Zombie-Name) = The Zombie Name
|
where "Zombie-Name" is the name of the class. Spaces must be replaced with a dash "-".
Suppose you've this in zp_zombieclasses.ini
Code:
[Classic Zombie]
NAME = Classic Zombie
INFO = =Balanced=
MODELS = host_zombie
CLAWMODEL = models/nst_zombie/v_knife_tank_zombi.mdl
HEALTH = 3000
SPEED = 0.75
GRAVITY = 1.00
KNOCKBACK = 1.00
You would replace "Zombie-Name" with the one marked in red, in this case, Classic Zombie.
Code:
ZOMBIE(Classic-Zombie) = Classic Zombie
Hope that makes sense.
__________________