mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-15 04:23:13 +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;
|
[_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;
|
_obj = _this;
|
||||||
_typeOf = typeOf _obj;
|
_typeOf = typeOf _obj;
|
||||||
_packedClass = getText (configFile >> "CfgVehicles" >> _typeOf >> "packedClass");
|
_packedClass = getText (configFile >> "CfgVehicles" >> _typeOf >> "packedClass");
|
||||||
_text = getText (configFile >> "CfgVehicles" >> _typeOf >> "displayName");
|
_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;
|
_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;};
|
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;};
|
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;
|
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 {
|
if (!isNull _obj && {alive _obj}) exitWith {s_player_packvault = -1;dayz_actionInProgress = false;};
|
||||||
format[localize "str_epoch_player_122",_text] call dayz_rollingMessages;
|
[player,"tentpack",0,false] call dayz_zombieSpeak;
|
||||||
s_player_packvault = -1;
|
|
||||||
dayz_actionInProgress = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!isNull _obj && {alive _obj}) then {
|
format[localize "str_epoch_player_121",_text] call dayz_rollingMessages;
|
||||||
[player,"tentpack",0,false] call dayz_zombieSpeak;
|
|
||||||
|
|
||||||
_finished = ["Medic",1] call fn_loopAction;
|
_finished = ["Medic",1] call fn_loopAction;
|
||||||
if (isNull _obj || !_finished) exitWith {};
|
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
|
_playerNear = {isPlayer _x} count (([_obj] call FNC_GetPos) nearEntities ["CAManBase", 12]) > 1;
|
||||||
dze_waiting = nil;
|
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];
|
dze_waiting = nil;
|
||||||
publicVariableServer "PVDZE_handleSafeGear";
|
|
||||||
|
|
||||||
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;
|
s_player_packvault = -1;
|
||||||
dayz_actionInProgress = false;
|
dayz_actionInProgress = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user