mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
Humanity changes for killing zeds and more.
[ADDED] +5 humanity for killing zombie, -10 for gutting, +20 for exchanging zombie parts for biomeat.
This commit is contained in:
@@ -78,6 +78,12 @@ if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then {
|
||||
publicVariable "dayzGutBodyZ";
|
||||
};
|
||||
|
||||
// Reduce humanity for gutting zeds
|
||||
_humanity = player getVariable["humanity",0];
|
||||
_humanity = _humanity - 10;
|
||||
player setVariable["humanity",_humanity,true];
|
||||
|
||||
|
||||
_string = format["Successfully Gutted Zombie",_text,_qty];
|
||||
cutText [_string, "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
@@ -81,10 +81,22 @@ for "_x" from 1 to _total_trades do {
|
||||
|
||||
_removed = _removed + ([player,_part_in,_qty_in] call BIS_fnc_invRemove);
|
||||
if (_removed == _qty_in) then {
|
||||
|
||||
|
||||
_humanityGain = 0;
|
||||
for "_x" from 1 to _qty_out do {
|
||||
player addMagazine _part_out;
|
||||
if(_part_out == "FoodBioMeat") then {
|
||||
_humanityGain = _humanityGain + 20;
|
||||
};
|
||||
};
|
||||
|
||||
if(_humanityGain > 0) then {
|
||||
// Increase humanity for turning in bio meat
|
||||
_humanity = player getVariable["humanity",0];
|
||||
_humanity = _humanity + 20;
|
||||
player setVariable["humanity",_humanity,true];
|
||||
};
|
||||
|
||||
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
|
||||
} else {
|
||||
|
||||
@@ -11,4 +11,9 @@ _type = _this select 1;
|
||||
if (local _zed) then {
|
||||
_kills = _killer getVariable[_type,0];
|
||||
_killer setVariable[_type,(_kills + 1),true];
|
||||
|
||||
//increase players humanity when zed killed
|
||||
_humanity = player getVariable["humanity",0];
|
||||
_humanity = _humanity + 5;
|
||||
player setVariable["humanity",_humanity,true];
|
||||
};
|
||||
@@ -18,8 +18,6 @@ if (local _zombiebody) then {
|
||||
publicVariable "dayzHideBody"; // remote player
|
||||
sleep 5;
|
||||
deleteVehicle _body;
|
||||
// Give small humanity increase after body is removed
|
||||
[player,1] call player_humanityChange;
|
||||
true;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user