Hide body changes

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.
This commit is contained in:
AirwavesMan
2020-11-19 15:10:10 +01:00
parent 72650aa7ca
commit 86d52c907d
5 changed files with 11 additions and 33 deletions

View File

@@ -31,20 +31,7 @@ if (local _animalbody) then {
};
hideBody _body;
//No need to let everyone on the server know.
//PVCDZ_obj_HideBody = _body;
//publicVariable "PVCDZ_obj_HideBody"; // remote player
//Send to server let everyone in 100 meters of the body know its just been hidden.
_inRange = _pos nearEntities ["CAManBase",100];
{
if ((isPlayer _x) && {_x != player}) then {
PVDZ_send = [_x,"HideBody",[_body]];
publicVariableServer "PVDZ_send";
};
} count _inRange;
uiSleep 5;
uiSleep 10;
deleteVehicle _body;
true
};