diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index 63102af22..357ecbe37 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -15,6 +15,20 @@ _inVehicle = (_vehicle != player); _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; _canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder); +// ---------------------------------------Maintain Area Start------------------------------------ + if (_canDo && (speed player <= 1) && (cursorTarget isKindOf "Plastic_Pole_EP1_DZ")) then { + if (s_player_maintain_area < 0) then { + s_player_maintain_area = player addAction ["Maintain Area", "\z\addons\dayz_code\actions\maintain_area.sqf", "maintain", 5, false]; + s_player_maintain_area_preview = player addAction ["Maintain Area Preview", "\z\addons\dayz_code\actions\maintain_area.sqf", "preview", 5, false]; + }; + } else { + player removeAction s_player_maintain_area; + s_player_maintain_area = -1; + player removeAction s_player_maintain_area_preview; + s_player_maintain_area_preview = -1; + }; +// ---------------------------------------Maintain Area End------------------------------------ + _nearLight = nearestObject [player,"LitObject"]; _canPickLight = false; if (!isNull _nearLight) then {