Lesson Add (Control)
In these lesson i will explain how to develop [Zombie Plague Advance v1.6.1] re programming nemesis/assassin control.
Open your Zombie Plague main script (.sma). Then find this:
first press [Ctrl + F] and find this line:
PHP Code:
// Ham Take Damage Post Forward
it's have codes:
PHP Code:
// Ham Take Damage Post Forward public fw_TakeDamage_Post(victim)
{
// --- Check if victim should be Pain Shock Free ---
// Check if proper CVARs are enabled
if (g_zombie[victim])
{
// Nemesis
if (g_nemesis[victim])
{
if (!get_pcvar_num(cvar_nempainfree)) return;
}
// Assassin
else if (g_assassin[victim])
{
if (!get_pcvar_num(cvar_assassinpainfree)) return;
}
// Zombie
else
{
switch (get_pcvar_num(cvar_zombiepainfree))
{
case 0: return;
case 2: if (!g_lastzombie[victim]) return;
}
}
}
else
{
// Survivor
if (g_survivor[victim])
{
if (!get_pcvar_num(cvar_survpainfree)) return;
}
// Sniper
if (g_sniper[victim])
{
if (!get_pcvar_num(cvar_sniperpainfree)) return;
}
// Human
else return;
}
// Set pain shock free offset
set_pdata_float(victim, OFFSET_PAINSHOCK, 1.0, OFFSET_LINUX)
}
replace all codes to:
PHP Code:
// Ham Take Damage Post Forward public fw_TakeDamage_Post(victim)
{
// --- Check if victim should be Pain Shock Free ---
// Check if proper CVARs are enabled
if (g_zombie[victim])
{
// Nemesis
if (g_nemesis[victim])
{
if (!(pev(victim,pev_button)&IN_JUMP && pev(victim,pev_button)&IN_DUCK)) return;
}
// Assassin
else if (g_assassin[victim])
{
if (!(pev(victim,pev_button)&IN_FORWARD && pev(victim,pev_button)&IN_FORWARD)) return;
}
// Zombie
else
{
switch (get_pcvar_num(cvar_zombiepainfree))
{
case 0: return;
case 2: if (!g_lastzombie[victim]) return;
}
}
}
else
{
// Survivor
if (g_survivor[victim])
{
if (!get_pcvar_num(cvar_survpainfree)) return;
}
// Sniper
if (g_sniper[victim])
{
if (!get_pcvar_num(cvar_sniperpainfree)) return;
}
// Human
else return;
}
// Set pain shock free offset
set_pdata_float(victim, OFFSET_PAINSHOCK, 1.0, OFFSET_LINUX)
}
now press [Ctrl + F] and find this cvars and remove it:
PHP Code:
cvar_nempainfree
cvar_assassinpainfree
now press [Ctrl + F] and find this line:
PHP Code:
// CVARS - Assassin
it's have codes:
PHP Code:
// CVARS - Assassin
cvar_assassin = register_cvar("zp_assassin_enabled", "1")
cvar_assassinchance = register_cvar("zp_assassin_chance", "20")
cvar_assassinminplayers = register_cvar("zp_assassin_min_players", "0")
cvar_assassinhp = register_cvar("zp_assassin_health", "0")
cvar_assassinbasehp = register_cvar("zp_assassin_base_health", "0")
cvar_assassinspd = register_cvar("zp_assassin_speed", "250")
cvar_assassingravity = register_cvar("zp_assassin_gravity", "0.5")
cvar_assassindamage = register_cvar("zp_assassin_damage", "250")
cvar_assassinglow = register_cvar("zp_assassin_glow", "1")
cvar_assassinaura = register_cvar("zp_assassin_aura", "1")
cvar_assassinpainfree = register_cvar("zp_assassin_painfree", "0")
cvar_assassinignorefrags = register_cvar("zp_assassin_ignore_frags", "1")
cvar_assassinignoreammo = register_cvar("zp_assassin_ignore_rewards", "1")
replace all codes to:
PHP Code:
// CVARS - Assassin
cvar_assassin = register_cvar("zp_assassin_enabled", "1")
cvar_assassinchance = register_cvar("zp_assassin_chance", "20")
cvar_assassinminplayers = register_cvar("zp_assassin_min_players", "0")
cvar_assassinhp = register_cvar("zp_assassin_health", "0")
cvar_assassinbasehp = register_cvar("zp_assassin_base_health", "0")
cvar_assassinspd = register_cvar("zp_assassin_speed", "250")
cvar_assassingravity = register_cvar("zp_assassin_gravity", "0.5")
cvar_assassindamage = register_cvar("zp_assassin_damage", "250")
cvar_assassinglow = register_cvar("zp_assassin_glow", "1")
cvar_assassinaura = register_cvar("zp_assassin_aura", "1")
cvar_assassinignorefrags = register_cvar("zp_assassin_ignore_frags", "1")
cvar_assassinignoreammo = register_cvar("zp_assassin_ignore_rewards", "1")
now press [Ctrl + F] and find this line:
PHP Code:
// CVARS - Nemesis
it's have codes:
PHP Code:
// CVARS - Nemesis
cvar_nem = register_cvar("zp_nem_enabled", "1")
cvar_nemchance = register_cvar("zp_nem_chance", "20")
cvar_nemminplayers = register_cvar("zp_nem_min_players", "0")
cvar_nemhp = register_cvar("zp_nem_health", "0")
cvar_nembasehp = register_cvar("zp_nem_base_health", "0")
cvar_nemspd = register_cvar("zp_nem_speed", "250")
cvar_nemgravity = register_cvar("zp_nem_gravity", "0.5")
cvar_nemdamage = register_cvar("zp_nem_damage", "250")
cvar_nemglow = register_cvar("zp_nem_glow", "1")
cvar_nemaura = register_cvar("zp_nem_aura", "1")
cvar_nempainfree = register_cvar("zp_nem_painfree", "0")
cvar_nemignorefrags = register_cvar("zp_nem_ignore_frags", "1")
cvar_nemignoreammo = register_cvar("zp_nem_ignore_rewards", "1")
replace all codes to:
PHP Code:
// CVARS - Nemesis
cvar_nem = register_cvar("zp_nem_enabled", "1")
cvar_nemchance = register_cvar("zp_nem_chance", "20")
cvar_nemminplayers = register_cvar("zp_nem_min_players", "0")
cvar_nemhp = register_cvar("zp_nem_health", "0")
cvar_nembasehp = register_cvar("zp_nem_base_health", "0")
cvar_nemspd = register_cvar("zp_nem_speed", "250")
cvar_nemgravity = register_cvar("zp_nem_gravity", "0.5")
cvar_nemdamage = register_cvar("zp_nem_damage", "250")
cvar_nemglow = register_cvar("zp_nem_glow", "1")
cvar_nemaura = register_cvar("zp_nem_aura", "1")
cvar_nemignorefrags = register_cvar("zp_nem_ignore_frags", "1")
cvar_nemignoreammo = register_cvar("zp_nem_ignore_rewards", "1")
end lesson. now the assassin + nemesis are have very good control.
special thanks to arvel about this leasson