overrideHealth added

This commit is contained in:
Fierelier 2018-04-19 22:01:18 +02:00
parent 5e0d6525f6
commit 896db94b17

View File

@ -18,6 +18,7 @@ namespace pdHealth
int armorRegen = 25; //How far to regenerate the armor int armorRegen = 25; //How far to regenerate the armor
int armorRegenSpeed = 1; //How much armor to regenerate per tick int armorRegenSpeed = 1; //How much armor to regenerate per tick
int armorRegenDelay = 5000; //Delay before recharging armor 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 allDamageArmor = true; //The armor soaks up all the health, even fall and explosion-damage.
bool ditchDamage = false; //Ditch damage, if hit depletes armor bool ditchDamage = false; //Ditch damage, if hit depletes armor
@ -30,6 +31,10 @@ namespace pdHealth
{ {
Ped pl = Player.Character; Ped pl = Player.Character;
if (overrideHealth != -1) {
if (pl.Health > overrideHealth) { pl.Health = overrideHealth; } //MaxHealth not functional?
}
if (pl.isAlive == false) { if (pl.isAlive == false) {
armorVal = -1; armorVal = -1;
healthVal = -1; healthVal = -1;