mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
@@ -27,7 +27,7 @@
|
|||||||
position="action";
|
position="action";
|
||||||
radius = 3.0;
|
radius = 3.0;
|
||||||
onlyForPlayer = 1;
|
onlyForPlayer = 1;
|
||||||
condition = "alive this";
|
condition = "!dayz_actionInProgress && (alive this)";
|
||||||
statement = "this spawn object_dismantle;";
|
statement = "this spawn object_dismantle;";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
position="action";
|
position="action";
|
||||||
radius = 2.7;
|
radius = 2.7;
|
||||||
onlyForPlayer = 1;
|
onlyForPlayer = 1;
|
||||||
condition = "alive this";
|
condition = "!dayz_actionInProgress && (alive this)";
|
||||||
statement = "this spawn object_dismantle;";
|
statement = "this spawn object_dismantle;";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
position="action";
|
position="action";
|
||||||
radius = 3.0;
|
radius = 3.0;
|
||||||
onlyForPlayer = 1;
|
onlyForPlayer = 1;
|
||||||
condition = "alive this";
|
condition = "!dayz_actionInProgress && (alive this)";
|
||||||
statement = "this spawn object_dismantle;";
|
statement = "this spawn object_dismantle;";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||||
|
dayz_actionInProgress = true;
|
||||||
|
|
||||||
private ["_object","_proceed","_rndattemps","_limit","_dismantleToo","_ownerID","_objectID","_objectUID","_playerID","_claimedBy","_tools","_exit","_end","_onLadder","_isWater","_isOk","_counter","_text","_dis","_sfx","_animState","_started","_finished","_isMedic"];
|
private ["_object","_proceed","_rndattemps","_limit","_dismantleToo","_ownerID","_objectID","_objectUID","_playerID","_claimedBy","_tools","_exit","_end","_onLadder","_isWater","_isOk","_counter","_text","_dis","_sfx","_animState","_started","_finished","_isMedic"];
|
||||||
|
|
||||||
_object = _this;
|
_object = _this;
|
||||||
@@ -36,14 +39,14 @@ _tools = getArray (configFile >> "CfgVehicles" >> (typeOf _object) >> "dismantle
|
|||||||
} foreach _tools;
|
} foreach _tools;
|
||||||
|
|
||||||
//End missing tools
|
//End missing tools
|
||||||
if (_exit) exitwith {};
|
if (_exit) exitwith {dayz_actionInProgress = false;};
|
||||||
|
|
||||||
|
|
||||||
//Normal blocked stuff
|
//Normal blocked stuff
|
||||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||||
_isWater = (surfaceIsWater (getPosATL player)) or dayz_isSwimming;
|
_isWater = (surfaceIsWater (getPosATL player)) or dayz_isSwimming;
|
||||||
|
|
||||||
if(_isWater or _onLadder) exitWith { localize "str_water_ladder_cant_do" call dayz_rollingMessages; };
|
if(_isWater or _onLadder) exitWith {dayz_actionInProgress = false; localize "str_water_ladder_cant_do" call dayz_rollingMessages;};
|
||||||
|
|
||||||
//Start loop
|
//Start loop
|
||||||
_isOk = true;
|
_isOk = true;
|
||||||
@@ -151,8 +154,7 @@ if (_proceed) then {
|
|||||||
|
|
||||||
format [localize "STR_BLD_DISMANTLED",typeOf _object] call dayz_rollingMessages;
|
format [localize "STR_BLD_DISMANTLED",typeOf _object] call dayz_rollingMessages;
|
||||||
|
|
||||||
_activatingPlayer = player;
|
PVDZ_obj_Destroy = [_objectID,_objectUID,player];
|
||||||
PVDZ_obj_Destroy = [_objectID,_objectUID, _activatingPlayer];
|
|
||||||
publicVariableServer "PVDZ_obj_Destroy";
|
publicVariableServer "PVDZ_obj_Destroy";
|
||||||
|
|
||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
@@ -163,4 +165,6 @@ if (_proceed) then {
|
|||||||
deleteVehicle _object;
|
deleteVehicle _object;
|
||||||
|
|
||||||
[_dismantleToo,1,1] call fn_dropItem;
|
[_dismantleToo,1,1] call fn_dropItem;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dayz_actionInProgress = false;
|
||||||
Reference in New Issue
Block a user