mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Area Maintenance
This commit is contained in:
@@ -15,6 +15,20 @@ _inVehicle = (_vehicle != player);
|
|||||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||||
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
|
_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 ["<t color=""#ffffff"">Maintain Area</t>", "\z\addons\dayz_code\actions\maintain_area.sqf", "maintain", 5, false];
|
||||||
|
s_player_maintain_area_preview = player addAction ["<t color=""#ccffffff"">Maintain Area Preview</t>", "\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"];
|
_nearLight = nearestObject [player,"LitObject"];
|
||||||
_canPickLight = false;
|
_canPickLight = false;
|
||||||
if (!isNull _nearLight) then {
|
if (!isNull _nearLight) then {
|
||||||
|
|||||||
Reference in New Issue
Block a user