cleanup vault lock

This commit is contained in:
[VB]AWOL
2013-11-25 09:36:55 -06:00
parent 26702cc8e3
commit 0f93e592ec

View File

@@ -8,38 +8,38 @@ private ["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_holder","_we
if(TradeInprogress) exitWith { cutText [(localize "str_epoch_player_10") , "PLAIN DOWN"]; };
TradeInprogress = true;
_obj = _this;
player removeAction s_player_lockvault;
s_player_lockvault = 1;
_lockedClass = getText (configFile >> "CfgVehicles" >> (typeOf _obj) >> "lockedClass");
_text = getText (configFile >> "CfgVehicles" >> (typeOf _obj) >> "displayName");
_obj = _this;
_objType = typeOf _obj;
_lockedClass = getText (configFile >> "CfgVehicles" >> _objType >> "lockedClass");
_text = getText (configFile >> "CfgVehicles" >> _objType >> "displayName");
// Silently exit if object no longer exists
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;
if(_playerNear) exitWith { TradeInprogress = false; cutText [(localize "str_epoch_player_11") , "PLAIN DOWN"]; };
_ownerID = _obj getVariable["CharacterID","0"];
_objectID = _obj getVariable["ObjectID","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"]; };
_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"]};
_obj setVariable["packing",1];
_dir = direction _obj;
// _pos = getposATL _obj;
_pos = _obj getVariable["OEMPos",(getposATL _obj)];
[player,"tentpack",0,false] call dayz_zombieSpeak;
sleep 3;
_pos = _obj getVariable["OEMPos",(getposATL _obj)];
if(!isNull _obj) then {
@@ -77,7 +77,6 @@ if(!isNull _obj) then {
};
cutText [format[(localize "str_epoch_player_117"),_text], "PLAIN DOWN"];
s_player_lockvault = -1;
};
s_player_lockvault = -1;
TradeInprogress = false;