Alright, so this is my first ever Pawn program.... so dont laugh.
I need some help.
How do i increase/decease a players health by 1?
How do i make a small blood splurt?
Other than that, is this right so far?
#include <amxmodx>
#include <amxmisc> //This contains some useful functions
#include <fun> //This contains the function to change health
new PLUGIN[]="Bleed/Heal Mod"
new AUTHOR[]="Stars"
new VERSION[]="0.01"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_event("Damage", "hook_Damage", "be", "2>0");
}
public hook_Damage(id)
{
new damage = read_data(2);
new name[32];
get_user_name(id, name, 31);
new health = pev(id, pev_health);
new dam_mult = 3;
new time;
if (damage > 75)
{ dam_mult = 2;
}
else if (damage < 25)
{ dam_mult = 4;
}
if ((50-health)>0)
{ time = (3*(50-health))
while (time > 0)
{ set_task(1.0, func_dam(time, dam_mult, health));
time--;
}
}
else
{ time = (2*(50-(100-health));
while (time > 0)
{ set_task(1.0, func_heal(time, dam_mult, health));
time--;
}
}
func_heal(time, dam_mult, health)
{ if (time%dam_mult == 0)
{ *****HEALTH +1******
}
}
func_dam(time, dam_mult, health)
{ if (time%dam_mult == 0)
{ *****HEALTH -1******
*****BLOOD SPLURT******
}
}
return PLUGIN_HANDLED
}