mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-21 15:40:50 +03:00
made use of GV and removed retry
This commit is contained in:
@@ -10,8 +10,9 @@ player removeAction s_player_maintain_area_preview;
|
|||||||
s_player_maintain_area_preview = 1;
|
s_player_maintain_area_preview = 1;
|
||||||
|
|
||||||
_target = cursorTarget; // Plastic_Pole_EP1_DZ
|
_target = cursorTarget; // Plastic_Pole_EP1_DZ
|
||||||
_objectClasses = ["ModularItems", "DZE_Housebase"] + DZE_ExtraMaintain;
|
|
||||||
_range = ((DZE_PlotPole select 0)+20); // set the max range for the maintain area
|
_objectClasses = DZE_maintainClasses;
|
||||||
|
_range = DZE_maintainRange; // set the max range for the maintain area
|
||||||
_objects = nearestObjects [_target, _objectClasses, _range];
|
_objects = nearestObjects [_target, _objectClasses, _range];
|
||||||
|
|
||||||
//filter to only those that have 10% damage
|
//filter to only those that have 10% damage
|
||||||
@@ -77,15 +78,9 @@ switch _option do {
|
|||||||
|
|
||||||
// all required items removed from player gear
|
// all required items removed from player gear
|
||||||
if (_tobe_removed_total == _removed_total) then {
|
if (_tobe_removed_total == _removed_total) then {
|
||||||
_uniqueID = random(99999);
|
|
||||||
_retry = 0;
|
|
||||||
cutText [format[(localize "STR_EPOCH_ACTIONS_4"), _count], "PLAIN DOWN", 5];
|
cutText [format[(localize "STR_EPOCH_ACTIONS_4"), _count], "PLAIN DOWN", 5];
|
||||||
while {3 >= _retry} do { // 3 Times
|
PVDZE_maintainArea = [player,1,_target];
|
||||||
_retry = _retry + 1;
|
publicVariableServer "PVDZE_maintainArea";
|
||||||
PVDZE_maintainArea = [player,1,[_target, _objectClasses, _range],_uniqueID];
|
|
||||||
publicVariableServer "PVDZE_maintainArea";
|
|
||||||
sleep 20;
|
|
||||||
};
|
|
||||||
} else {
|
} else {
|
||||||
{player addMagazine _x;} forEach _temp_removed_array;
|
{player addMagazine _x;} forEach _temp_removed_array;
|
||||||
cutText [format[(localize "STR_EPOCH_ACTIONS_5"),_removed_total,_tobe_removed_total], "PLAIN DOWN"];
|
cutText [format[(localize "STR_EPOCH_ACTIONS_5"),_removed_total,_tobe_removed_total], "PLAIN DOWN"];
|
||||||
|
|||||||
Reference in New Issue
Block a user