Rearrange packVault

Thanks @AirwavesMan for the headsup.
This commit is contained in:
oiad
2020-06-14 12:45:42 +12:00
parent b06d3d4623
commit 7a19c7abef

View File

@@ -5,7 +5,7 @@ dayz_actionInProgress = true;
[_obj] spawn player_packVault;
*/
private ["_obj","_ownerID","_objectID","_objectUID","_location1","_location2","_packedClass","_text","_playerNear","_finished","_ComboMatch","_typeOf"];
private ["_obj","_ownerID","_objectID","_objectUID","_packedClass","_text","_playerNear","_finished","_ComboMatch","_typeOf"];
_obj = _this;
_typeOf = typeOf _obj;
@@ -31,26 +31,22 @@ if (_objectID == "0" && _objectUID == "0") exitWith {dayz_actionInProgress = fal
if (!_ComboMatch && (_ownerID != dayz_playerUID)) exitWith {dayz_actionInProgress = false; s_player_packvault = -1; format[localize "str_epoch_player_119",_text] call dayz_rollingMessages;};
format[localize "str_epoch_player_121",_text] call dayz_rollingMessages;
uiSleep 1;
_location1 = getPosATL player;
uiSleep 5;
_location2 = getPosATL player;
if (_location1 distance _location2 > 0.1) exitWith {
format[localize "str_epoch_player_122",_text] call dayz_rollingMessages;
s_player_packvault = -1;
dayz_actionInProgress = false;
};
if (!isNull _obj && {alive _obj}) then {
if (!isNull _obj && {alive _obj}) exitWith {s_player_packvault = -1;dayz_actionInProgress = false;};
[player,"tentpack",0,false] call dayz_zombieSpeak;
format[localize "str_epoch_player_121",_text] call dayz_rollingMessages;
_finished = ["Medic",1] call fn_loopAction;
if (isNull _obj || !_finished) exitWith {};
if (isNull _obj || !_finished) exitWith {s_player_packvault = -1;dayz_actionInProgress = false;};
(findDisplay 106) closeDisplay 0; // Close gear
_playerNear = {isPlayer _x} count (([_obj] call FNC_GetPos) nearEntities ["CAManBase", 12]) > 1;
if (_playerNear) exitWith {dayz_actionInProgress = false; localize "str_pickup_limit_5" call dayz_rollingMessages;};
["Working",0,[3,2,4,0]] call dayz_NutritionSystem;
(findDisplay 106) closeDisplay 0; // Close gear
dze_waiting = nil;
[_packedClass,objNull] call fn_waitForObject;
@@ -61,7 +57,6 @@ if (!isNull _obj && {alive _obj}) then {
waitUntil {!isNil "dze_waiting"}; // wait for response from server to verify pack was logged and gear added before proceeding
format[localize "str_epoch_player_123",_text] call dayz_rollingMessages;
};
s_player_packvault = -1;
dayz_actionInProgress = false;