mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-15 21:29:59 +03:00
30 lines
843 B
Plaintext
30 lines
843 B
Plaintext
private ["_zombiebody","_ehLoc"];
|
|
_zombiebody = _this select 0;
|
|
// _qty = _this select 1;
|
|
|
|
if (local _zombiebody) then {
|
|
_zombiebody addMagazine "ItemZombieParts";
|
|
|
|
[time, _zombiebody] spawn {
|
|
private ["_timer", "_body"];
|
|
_timer = _this select 0;
|
|
_body = _this select 1;
|
|
while {(count magazines _body >0) and (time - _timer < 300) } do {
|
|
sleep 5;
|
|
};
|
|
//["dayzHideBody",_body] call broadcastRpcCallAll;
|
|
dayzHideBody = _body;
|
|
hideBody _body; // local player
|
|
publicVariable "dayzHideBody"; // remote player
|
|
sleep 5;
|
|
deleteVehicle _body;
|
|
// Give small humanity increase after body is removed
|
|
[player,1] call player_humanityChange;
|
|
true;
|
|
};
|
|
|
|
} else {
|
|
_ehLoc = "client";
|
|
if (isServer) then { _ehLoc = "server"; };
|
|
diag_log format["gutObject EH on %1 item not local ! Type: %2",_ehLoc,str(_zombiebody)];
|
|
}; |