mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-17 09:10:27 +03:00
Remove the PVCDZ_obj_HideBody eventhandler. Players next to a hided animal see the hiding process too and after 10s the body will be deleted anyways. So there is no need to send a publicVariableServer first then back to all near clients if the body gets deleted within 10s. Also updates the normal hide body. The hided player model gets deleted by the server now.
24 lines
604 B
Plaintext
24 lines
604 B
Plaintext
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
|
dayz_actionInProgress = true;
|
|
|
|
player removeAction s_player_hide_body;
|
|
s_player_hide_body = -1;
|
|
|
|
closeDialog 0;
|
|
|
|
local _body = _this select 3;
|
|
if (isNull _body) exitWith {systemChat localize "str_cursorTargetNotFound"; dayz_actionInProgress = false;};
|
|
|
|
player action ["hideBody", _body];
|
|
|
|
dayz_actionInProgress = false;
|
|
|
|
uisleep 10;
|
|
|
|
if ((_body getVariable ["bodyName","unknown"]) != "unknown") then {
|
|
PVDZ_plr_Delete = _body;
|
|
publicVariableServer "PVDZ_plr_Delete";
|
|
} else {
|
|
deleteVehicle _body;
|
|
};
|