Gostaria de saber como almenta o dano da arma do survivor pra ZP 5.0.
Código:
new g_IsSurvivor
Código:
new cvar_surv_damage
Código:
cvar_survivor_weapon_block = register_cvar("zp_survivor_weapon_block", "1")
Código:
cvar_surv_damage = register_cvar("zp_survivor_damage","1,0")
Código:
RegisterHam(Ham_Touch, "weaponbox", "fw_TouchWeapon")
Código:
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
Código:
// Ham Take Damage Forward
public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
{
// Non-player damage or self damage
if (victim == attacker || !is_user_alive(attacker))
return HAM_IGNORED;
// Assassin attacking human
if (flag_get(g_IsSurvivor, attacker) && zp_core_is_zombie(victim))
{
// Ignore assassin damage override if damage comes from a 3rd party entity
// (to prevent this from affecting a sub-plugin's rockets e.g.)
if (inflictor == attacker)
{
new plrWeapId, plrClip, plrAmmo
plrWeapId = get_user_weapon(attacker, plrClip, plrAmmo)
if (plrWeapId == CSW_M249)
SetHamParamFloat(4, get_pcvar_float(cvar_surv_damage))
return HAM_HANDLED;
}
}
return HAM_IGNORED;
}