DjTranceFire
7th March 2014, 11:11
Hey there.. :)
I'm trying to disable health regeneration in my mod.
I know there is a dvar like "scr_player_healthregeneration" but setting it to "0" doesnt work.
Because of that i tried to force the health:
_health()
{
while(1)
{
health = self.health;
self.maxhealth = health;
self iprintln("Health:" + health);
wait 1;
}
}
Its working but its not the best way to do it.
If the player gets damage, he's breathing all the time and if he gets enough damage to get <1 its like a godmode.
Does someone knows a better way to disable health regeneration in cod4?
I'm trying to disable health regeneration in my mod.
I know there is a dvar like "scr_player_healthregeneration" but setting it to "0" doesnt work.
Because of that i tried to force the health:
_health()
{
while(1)
{
health = self.health;
self.maxhealth = health;
self iprintln("Health:" + health);
wait 1;
}
}
Its working but its not the best way to do it.
If the player gets damage, he's breathing all the time and if he gets enough damage to get <1 its like a godmode.
Does someone knows a better way to disable health regeneration in cod4?