mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
Rearrange packVault
Thanks @AirwavesMan for the headsup.
This commit is contained in:
@@ -5,14 +5,14 @@ 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;
|
||||
_packedClass = getText (configFile >> "CfgVehicles" >> _typeOf >> "packedClass");
|
||||
_text = getText (configFile >> "CfgVehicles" >> _typeOf >> "displayName");
|
||||
|
||||
if (isNull _obj || !(alive _obj)) exitWith { dayz_actionInProgress = false; };
|
||||
if (isNull _obj || !(alive _obj)) exitWith {dayz_actionInProgress = false;};
|
||||
|
||||
_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;};
|
||||
@@ -31,37 +31,32 @@ 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}) exitWith {s_player_packvault = -1;dayz_actionInProgress = false;};
|
||||
[player,"tentpack",0,false] call dayz_zombieSpeak;
|
||||
|
||||
if (!isNull _obj && {alive _obj}) then {
|
||||
[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 {};
|
||||
_finished = ["Medic",1] call fn_loopAction;
|
||||
if (isNull _obj || !_finished) exitWith {s_player_packvault = -1;dayz_actionInProgress = false;};
|
||||
|
||||
["Working",0,[3,2,4,0]] call dayz_NutritionSystem;
|
||||
(findDisplay 106) closeDisplay 0; // Close gear
|
||||
|
||||
(findDisplay 106) closeDisplay 0; // Close gear
|
||||
dze_waiting = nil;
|
||||
_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;};
|
||||
|
||||
[_packedClass,objNull] call fn_waitForObject;
|
||||
["Working",0,[3,2,4,0]] call dayz_NutritionSystem;
|
||||
|
||||
PVDZE_handleSafeGear = [player,_obj,2];
|
||||
publicVariableServer "PVDZE_handleSafeGear";
|
||||
dze_waiting = nil;
|
||||
|
||||
waitUntil {!isNil "dze_waiting"}; // wait for response from server to verify pack was logged and gear added before proceeding
|
||||
[_packedClass,objNull] call fn_waitForObject;
|
||||
|
||||
format[localize "str_epoch_player_123",_text] call dayz_rollingMessages;
|
||||
};
|
||||
PVDZE_handleSafeGear = [player,_obj,2];
|
||||
publicVariableServer "PVDZE_handleSafeGear";
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user