mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Push #941 - HideBody
This commit is contained in:
@@ -74,9 +74,12 @@ if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then {
|
|||||||
|
|
||||||
if (_hasKnifeBlunt) then { _qty = round(_qty / 2); };
|
if (_hasKnifeBlunt) then { _qty = round(_qty / 2); };
|
||||||
|
|
||||||
PVDZE_plr_GutBody = [_item,_qty];
|
if (local _item) then {
|
||||||
PVDZE_plr_GutBody spawn local_gutObject;
|
[_item,_qty] spawn local_gutObject;
|
||||||
publicVariable "PVDZE_plr_GutBody";
|
} else {
|
||||||
|
PVDZE_plr_GutBody =[_item,_qty];
|
||||||
|
publicVariable "PVDZE_plr_GutBody";
|
||||||
|
};
|
||||||
|
|
||||||
_string = format[localize "str_success_gutted_animal",_text,_qty];
|
_string = format[localize "str_success_gutted_animal",_text,_qty];
|
||||||
cutText [_string, "PLAIN DOWN"];
|
cutText [_string, "PLAIN DOWN"];
|
||||||
|
|||||||
@@ -11,15 +11,25 @@ if (local _animalbody) then {
|
|||||||
|
|
||||||
[time, _animalbody] spawn {
|
[time, _animalbody] spawn {
|
||||||
private ["_timer", "_body"];
|
private ["_timer", "_body"];
|
||||||
_timer = _this select 0;
|
_timer = _this select 0;
|
||||||
_body = _this select 1;
|
_body = _this select 1;
|
||||||
|
_pos = getPosATL _body;
|
||||||
while {(count magazines _body >0) and (time - _timer < 300) } do {
|
while {(count magazines _body >0) and (time - _timer < 300) } do {
|
||||||
sleep 5;
|
sleep 5;
|
||||||
};
|
};
|
||||||
//["PVDZE_plr_HideBody",_body] call broadcastRpcCallAll;
|
|
||||||
PVDZE_plr_HideBody = _body;
|
PVDZE_plr_HideBody = _body;
|
||||||
hideBody _body; // local player
|
hideBody _body; // local player
|
||||||
publicVariable "PVDZE_plr_HideBody"; // remote player
|
publicVariable "PVDZE_plr_HideBody"; // remote player
|
||||||
|
|
||||||
|
/* WIP - PVS/PVC - Skaronator
|
||||||
|
_inRange = _pos nearEntities ["CAManBase",100];
|
||||||
|
{
|
||||||
|
PVDZE_send = [_x,"HideBody",[_body]];
|
||||||
|
publicVariableServer "PVDZE_send";
|
||||||
|
} forEach _inRange;
|
||||||
|
*/
|
||||||
|
|
||||||
sleep 5;
|
sleep 5;
|
||||||
deleteVehicle _body;
|
deleteVehicle _body;
|
||||||
true;
|
true;
|
||||||
|
|||||||
@@ -7,8 +7,9 @@ if (local _zombiebody) then {
|
|||||||
|
|
||||||
[time, _zombiebody] spawn {
|
[time, _zombiebody] spawn {
|
||||||
private ["_timer", "_body"];
|
private ["_timer", "_body"];
|
||||||
_timer = _this select 0;
|
_timer = _this select 0;
|
||||||
_body = _this select 1;
|
_body = _this select 1;
|
||||||
|
_pos = getPosATL _body;
|
||||||
while {(count magazines _body >0) and (time - _timer < 300) } do {
|
while {(count magazines _body >0) and (time - _timer < 300) } do {
|
||||||
sleep 5;
|
sleep 5;
|
||||||
};
|
};
|
||||||
@@ -16,6 +17,15 @@ if (local _zombiebody) then {
|
|||||||
PVDZE_plr_HideBody = _body;
|
PVDZE_plr_HideBody = _body;
|
||||||
hideBody _body; // local player
|
hideBody _body; // local player
|
||||||
publicVariable "PVDZE_plr_HideBody"; // remote player
|
publicVariable "PVDZE_plr_HideBody"; // remote player
|
||||||
|
|
||||||
|
/* WIP - PVS/PVC - Skaronator
|
||||||
|
_inRange = _pos nearEntities ["CAManBase",100];
|
||||||
|
{
|
||||||
|
PVDZE_send = [_x,"HideBody",[_body]];
|
||||||
|
publicVariableServer "PVDZE_send";
|
||||||
|
} forEach _inRange;
|
||||||
|
*/
|
||||||
|
|
||||||
sleep 5;
|
sleep 5;
|
||||||
deleteVehicle _body;
|
deleteVehicle _body;
|
||||||
true;
|
true;
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
/* WIP - PVS/PVC Skaronator
|
/* WIP - PVS/PVC Skaronator
|
||||||
|
|
||||||
"PVCDZE_vehSH" addPublicVariableEventHandler {(_this select 1) call vehicle_handleDamage}; // set damage to vehicle part
|
"PVCDZE_vehSH" addPublicVariableEventHandler {(_this select 1) call vehicle_handleDamage}; // set damage to vehicle part
|
||||||
|
"PVCDZE_hideBody" addPublicVariableEventHandler {hideBody (_this select 1)};
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ _owner = owner _unit;
|
|||||||
|
|
||||||
//execution
|
//execution
|
||||||
switch (_variable) do {
|
switch (_variable) do {
|
||||||
case "VehHandleDam": {
|
case "VehHandleDam": { //DONE
|
||||||
_vehicle = _arraytosend select 0;
|
_vehicle = _arraytosend select 0;
|
||||||
if (local _vehicle) then {
|
if (local _vehicle) then {
|
||||||
_arraytosend call fnc_veh_handleDam;
|
_arraytosend call fnc_veh_handleDam;
|
||||||
@@ -20,7 +20,7 @@ switch (_variable) do {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
case "SetFuel": {
|
case "SetFuel": { //DONE
|
||||||
_vehicle = _arraytosend select 0;
|
_vehicle = _arraytosend select 0;
|
||||||
_qty = _arraytosend select 1;
|
_qty = _arraytosend select 1;
|
||||||
if (local _vehicle) then {
|
if (local _vehicle) then {
|
||||||
@@ -31,14 +31,9 @@ switch (_variable) do {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
case "GutBody": {
|
|
||||||
PVCDZ_obj_GutBody = _arraytosend;
|
|
||||||
_owner publicVariableClient "PVCDZ_obj_GutBody";
|
|
||||||
};
|
|
||||||
|
|
||||||
case "HideBody": {
|
case "HideBody": {
|
||||||
PVCDZ_obj_HideBody = _arraytosend select 0;
|
PVCDZE_hideBody = _arraytosend select 0;
|
||||||
_owner publicVariableClient "PVCDZ_obj_HideBody";
|
_owner publicVariableClient "PVCDZE_hideBody";
|
||||||
};
|
};
|
||||||
|
|
||||||
case "Humanity": {
|
case "Humanity": {
|
||||||
|
|||||||
Reference in New Issue
Block a user