mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-14 04:02:56 +03:00
cleanup vault lock
This commit is contained in:
@@ -8,38 +8,38 @@ private ["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_holder","_we
|
|||||||
if(TradeInprogress) exitWith { cutText [(localize "str_epoch_player_10") , "PLAIN DOWN"]; };
|
if(TradeInprogress) exitWith { cutText [(localize "str_epoch_player_10") , "PLAIN DOWN"]; };
|
||||||
TradeInprogress = true;
|
TradeInprogress = true;
|
||||||
|
|
||||||
_obj = _this;
|
player removeAction s_player_lockvault;
|
||||||
|
s_player_lockvault = 1;
|
||||||
|
|
||||||
_lockedClass = getText (configFile >> "CfgVehicles" >> (typeOf _obj) >> "lockedClass");
|
_obj = _this;
|
||||||
_text = getText (configFile >> "CfgVehicles" >> (typeOf _obj) >> "displayName");
|
_objType = typeOf _obj;
|
||||||
|
|
||||||
|
_lockedClass = getText (configFile >> "CfgVehicles" >> _objType >> "lockedClass");
|
||||||
|
_text = getText (configFile >> "CfgVehicles" >> _objType >> "displayName");
|
||||||
|
|
||||||
// Silently exit if object no longer exists
|
// Silently exit if object no longer exists
|
||||||
if(isNull _obj) exitWith { TradeInprogress = false; };
|
if(isNull _obj) exitWith { TradeInprogress = false; };
|
||||||
|
|
||||||
|
player playActionNow "Medic";
|
||||||
|
sleep 1;
|
||||||
|
[player,"tentpack",0,false] call dayz_zombieSpeak;
|
||||||
|
sleep 5;
|
||||||
|
|
||||||
_playerNear = _obj call dze_isnearest_player;
|
_playerNear = _obj call dze_isnearest_player;
|
||||||
if(_playerNear) exitWith { TradeInprogress = false; cutText [(localize "str_epoch_player_11") , "PLAIN DOWN"]; };
|
if(_playerNear) exitWith { TradeInprogress = false; cutText [(localize "str_epoch_player_11") , "PLAIN DOWN"]; };
|
||||||
|
|
||||||
_ownerID = _obj getVariable["CharacterID","0"];
|
_ownerID = _obj getVariable["CharacterID","0"];
|
||||||
_objectID = _obj getVariable["ObjectID","0"];
|
_objectID = _obj getVariable["ObjectID","0"];
|
||||||
_objectUID = _obj getVariable["ObjectUID","0"];
|
_objectUID = _obj getVariable["ObjectUID","0"];
|
||||||
player playActionNow "Medic";
|
|
||||||
|
|
||||||
player removeAction s_player_lockvault;
|
|
||||||
s_player_lockvault = 1;
|
|
||||||
|
|
||||||
if((_ownerID != dayz_combination) and (_ownerID != dayz_playerUID)) exitWith {TradeInprogress = false; s_player_lockvault = -1; cutText [format[(localize "str_epoch_player_115"),_text], "PLAIN DOWN"]; };
|
if((_ownerID != dayz_combination) and (_ownerID != dayz_playerUID)) exitWith {TradeInprogress = false; s_player_lockvault = -1; cutText [format[(localize "str_epoch_player_115"),_text], "PLAIN DOWN"]; };
|
||||||
|
|
||||||
_alreadyPacking = _obj getVariable["packing",0];
|
_alreadyPacking = _obj getVariable["packing",0];
|
||||||
|
|
||||||
if (_alreadyPacking == 1) exitWith {TradeInprogress = false; s_player_lockvault = -1; cutText [format[(localize "str_epoch_player_116"),_text], "PLAIN DOWN"]};
|
if (_alreadyPacking == 1) exitWith {TradeInprogress = false; s_player_lockvault = -1; cutText [format[(localize "str_epoch_player_116"),_text], "PLAIN DOWN"]};
|
||||||
|
|
||||||
_obj setVariable["packing",1];
|
_obj setVariable["packing",1];
|
||||||
|
|
||||||
_dir = direction _obj;
|
_dir = direction _obj;
|
||||||
// _pos = getposATL _obj;
|
_pos = _obj getVariable["OEMPos",(getposATL _obj)];
|
||||||
_pos = _obj getVariable["OEMPos",(getposATL _obj)];
|
|
||||||
[player,"tentpack",0,false] call dayz_zombieSpeak;
|
|
||||||
sleep 3;
|
|
||||||
|
|
||||||
if(!isNull _obj) then {
|
if(!isNull _obj) then {
|
||||||
|
|
||||||
@@ -77,7 +77,6 @@ if(!isNull _obj) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
cutText [format[(localize "str_epoch_player_117"),_text], "PLAIN DOWN"];
|
cutText [format[(localize "str_epoch_player_117"),_text], "PLAIN DOWN"];
|
||||||
|
|
||||||
s_player_lockvault = -1;
|
|
||||||
};
|
};
|
||||||
|
s_player_lockvault = -1;
|
||||||
TradeInprogress = false;
|
TradeInprogress = false;
|
||||||
Reference in New Issue
Block a user