Reset humanity on death

This can be change in the Database. 0 is not bandit.

Change the default humanity on the player profile table to 0.

EDIT: You will also have to reset the all the players profiles if you do it this way.
 
Try this out and let me know.

Misson.pbo

Create " player_resetDHumanity.sqf " inside your "fixes" folder.
Code:
private["_lowHumanity","_highHumanity","_resetHumanity"]
_lowHumanity = player getVariable ["humanity",0] < 0;
_highHumanity = player getVariable ["humanity",0] > 0;
_resetHumanity = 0;
 
if (_lowHumanity) or (_highHumanity) then {
    player setVariable ["humanity",_resetHumanity,true];
};


Open init.sqf:

Find:

Code:
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];


Change to:

Code:
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death; _null = [] execVM "fixes\player_resetDHumanity.sqf";}];


Untested but should work. :)
 
Back
Top