From dd721ec5728cfc544da8ac88036d10e82c51daf5 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Tue, 6 Dec 2016 12:12:38 -0500 Subject: [PATCH] Fix issue with tag friendlies #1807 --- SQF/dayz_code/compile/fn_check_access.sqf | 4 ++-- SQF/dayz_code/compile/fn_gearMenuChecks.sqf | 8 ++++---- SQF/dayz_code/stringtable.xml | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/SQF/dayz_code/compile/fn_check_access.sqf b/SQF/dayz_code/compile/fn_check_access.sqf index a551da543..c91087afa 100644 --- a/SQF/dayz_code/compile/fn_check_access.sqf +++ b/SQF/dayz_code/compile/fn_check_access.sqf @@ -70,8 +70,8 @@ _targetType = if(typeOf _target in DZE_DoorsLocked) then { "DOOR"; } else { "GEN // and check if player is owner of target object _playerUID = getPlayerUID _player; _characterID = dayz_characterID; -if(DZE_permanentPlot) then { - _targetOwnerUID = _target getVariable ["ownerPUID","0"]; +if (DZE_permanentPlot) then { + _targetOwnerUID = if (isPlayer _target) then { getPlayerUID _target } else { _target getVariable ["ownerPUID","0"] }; _isOwner = (_playerUID == _targetOwnerUID); } else { _targetOwnerUID = _target getVariable ["characterID","0"]; diff --git a/SQF/dayz_code/compile/fn_gearMenuChecks.sqf b/SQF/dayz_code/compile/fn_gearMenuChecks.sqf index acbee271c..8060b1e87 100644 --- a/SQF/dayz_code/compile/fn_gearMenuChecks.sqf +++ b/SQF/dayz_code/compile/fn_gearMenuChecks.sqf @@ -1,4 +1,4 @@ -private ["_exit","_nearestObjects","_friendlies","_rID","_display","_cTarget","_dis"]; +private ["_exit","_nearestObjects","_rID","_display","_cTarget","_dis","_friendlyTo","_lastSave","_startTime"]; // players inside vehicle can always access its gear if ((vehicle player) == player) then { @@ -29,9 +29,9 @@ if ((vehicle player) == player) then { }; }; if (DZE_BackpackAntiTheft) then { - _friendlies = player getVariable ["friendlies",[]]; + _friendlyTo = player getvariable ["friendlyTo",[]]; _rID = if (DZE_permanentPlot) then { getPlayerUID _cTarget } else { _cTarget getVariable ["CharacterID","0"] }; - if ((!canbuild or isInTraderCity) && {alive _cTarget} && {isPlayer _cTarget} && {!(_rID in _friendlies)} && {(player distance _cTarget) < 12}) then { + if ((!canbuild or isInTraderCity) && {alive _cTarget} && {isPlayer _cTarget} && {!(_rID in _friendlyTo) && !(_cTarget in (units group player))} && {(player distance _cTarget) < 12}) then { localize "STR_EPOCH_PLAYER_316" call dayz_rollingMessages; _display closeDisplay 2; }; @@ -59,4 +59,4 @@ if ((vehicle player) == player) then { } else { DZE_GearCheckBypass = false; //exit will always be false the when the above code opens a new gear menu, this will reset the variable }; -}; \ No newline at end of file +}; diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index a48334cb9..82c211e0d 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -13092,8 +13092,8 @@ %1 je omezeno. - You may only access friends' gear in this area. - Du kannst hier nur auf das Inventar von Freunden zugreifen. + You may only access friends or group members gear in this area. + Du kannst hier nur auf das Inventar von Freunden oder Gruppenmitgliedern zugreifen. Вы можете открывать рюкзаки только друзей в этой области. Sólo se puede acceder engranaje amigos en esta área. U mag alleen toegang tot versnelling vrienden 'op dit gebied.