Well to give a player "1+ Health" would look similar to this:
Code:
new health = get_user_health(id);
set_user_health(id,health+1);
Taking away the health should be obvious "set_user_health(id,health-1);"
NOTE: You can also do:
Code:
set_user_health(id,get_user_health(id)+1)
But if you're calling "set_user_health()" more then once, it's better the other way.
As for the blood 'splurts' that would mostlikely be accomplished by user messages. (Search for it)
Also, you have "functions in functions" You can't do this in Pawn/Small. So, i quickly went over the code abit, and commented it.
Code:
#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); // This is a Fakemeta native (You can use fun/engine modules to get this)
new health = get_user_health(id)
new dam_mult = 3;
//new time; // Time is a function/native, so your variable cannot be named this.
new szTime
if(damage > 75)
dam_mult = 2;
else if(damage < 25)
dam_mult = 4;
// I couldn't really make sence of that was below here.. S
if(50-health > 0 )
{
}
else
{
}
return PLUGIN_HANDLED
}
func_heal(id,szTime,dam_mult,health)
{
if(szTime % dam_mult == 0)
{
// Heath + 1
}
}
func_dam(id,szTime,dam_mult,health)
{
if(szTime % dam_mult == 0)
{
// Health
// Blood Splurt
}
}
I don't think that helps much.. but yeah..
__________________