Added overrideHealth

This commit is contained in:
Fierelier 2018-04-23 15:30:10 +02:00
parent 809672d61a
commit b9bdcf44d3

View File

@ -14,12 +14,13 @@ namespace pdHealth
}
//Settings:
int tickTime = 100; //Tick-Rate in ms
int armorRegen = 25; //How far to regenerate the armor
int armorRegenSpeed = 1; //How much armor to regenerate per tick
int armorRegenDelay = 5000; //Delay before recharging armor
bool allDamageArmor = true; //The armor soaks up all the health, even for fall and explosion-damage.
bool ditchDamage = false; //Ditch damage, if hit depletes armor completely
int tickTime = 100; //Tick-Rate in ms
int armorRegen = 25; //How far to regenerate the armor
int armorRegenSpeed = 1; //How much armor to regenerate per tick
int armorRegenDelay = 5000; //Delay before recharging armor
int overrideHealth = 50; //Set your max health to balance the regenerating armor. This will override any max health values set via trainer. Set to -1 to disable.
bool allDamageArmor = true; //The armor soaks up all the health, even fall and explosion-damage.
bool ditchDamage = false; //Ditch damage, if hit depletes armor
//Vars
int armorVal = -1;
@ -30,6 +31,10 @@ namespace pdHealth
{
Ped pl = Player.Character;
if (overrideHealth != -1) {
if (pl.Health > overrideHealth) { pl.Health = overrideHealth; } //MaxHealth not functional?
}
if (pl.isAlive == false) {
armorVal = -1;
healthVal = -1;