Quote:
Originally Posted by MokeN
I know in cashmod there should be an native called cm_get_user_health, or something like that.
Use that one, i think that's the easiest :p
|
seems I cant find the line with that sentence
anyways here's the heal code
--------------------------
ActionHeal(id, ent)
{
new Float:gametime = get_gametime();
if ( !( gametime >= g_next_heal_time[id] ) ) return PLUGIN_HANDLED;
new health = get_user_health(id);
if ( health >= 100 ) return PLUGIN_HANDLED;
static property[20];
GetProperty(ent, 1, property);
health += str_to_num(property);
set_user_health(id, min(100, health));
GetProperty(ent, 2, property);
g_next_heal_time[id] = gametime + str_to_float(property);
return PLUGIN_HANDLED;
}
-------------------------------------
Shouldn't you add something in this code? o.O