i need code to when human shoot zombie there is chance to disinfect him !
i try this but error when i jump and loose health.
Code:
L 07/14/2012 - 20:01:49: Info (map "de_dust") (file "addons/amxmodx/logs/error_20120714.log")
L 07/14/2012 - 20:01:49: [ZP] Invalid Player (0)
L 07/14/2012 - 20:01:49: [AMXX] Displaying debug trace (plugin "zp_main_class_human_medic.amxx")
L 07/14/2012 - 20:01:49: [AMXX] Run time error 10: native error (native "zp_class_human_get_current")
L 07/14/2012 - 20:01:49: [AMXX] [0] zp_main_class_human_medic.sma::fw_TakeDamage (line 35)
Code:
public fw_TakeDamage(victim, attacker)
{
if(attacker==victim)
return
if(zp_class_human_get_current(attacker) == human_medic )
{
if(!zp_core_is_zombie(attacker) && zp_class_nemesis_get(victim) && !is_user_bot(victim))
{
if(random_num(1,100) <= 5)
{
zp_core_cure(victim)
}
}
}
}
please help ! sorry my english . i use translator.