mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-23 16:40:50 +03:00
Pullrequest/door management (#1694)
* Added doorManagement * Rename FNC_check_owner --> FNC_check_owner_friends * Fixed typo * Fixed bug in FNC_check_owner_friends which allowed every user to manage every plot and door. * Removed unused DZE_doorManagementHarderPenalty from configVariables.sqf * Now checking if _playerUID is in _friendlies for both cases. * DZE_plotforLife should be DZE_permanentPlot * Fixed case where DZE_permanentPlot is false. * Forgot to add STR_EPOCH_CANCEL * Changed translations to suggested string by ebaydayz. * Renamed EyeScanner to DoorAccess. * Reworked access rights for door management. * DZE_doorManagementMustBeClose = true; //Players must be within 10m of door to be added as a door friend. * Fixed copy-paste error. * Replace count with if * Remove redundant test. * Also replaced count in door management admins check. * Change plotManagement and doorManagement to be consistent to DayZ_UseSteamID (get UID from FNC_GetPlayerUID). * Use _playerUID and _characterID more consistent. * Added german translation to STR_EPOCH_PLOTMANAGEMENT_ADDFRIEND_ALREADYONTHELIST.
This commit is contained in:
@@ -42,15 +42,23 @@ if (DZE_permanentPlot) then {
|
||||
|
||||
_playerUID = [_player] call FNC_GetPlayerUID;
|
||||
_targetOwner = _target getVariable ["ownerPUID","0"];
|
||||
_owner = (_playerUID == _targetOwner);
|
||||
|
||||
// Check if player is a plot friend
|
||||
if (_playerUID in _friendlies) then {
|
||||
_friendly = true;
|
||||
};
|
||||
} else {
|
||||
_playerUID = dayz_characterID;
|
||||
_friendlies = _player getVariable ["friendlyTo",[]];
|
||||
_targetOwner = _target getVariable ["CharacterID","0"];
|
||||
_owner = (_targetOwner == dayz_characterID);
|
||||
|
||||
// Check if target object owner is a friend of player
|
||||
if (_targetOwner in _friendlies) then {
|
||||
_friendly = true;
|
||||
};
|
||||
};
|
||||
|
||||
if (_targetOwner in _friendlies) then {
|
||||
_friendly = true;
|
||||
};
|
||||
// Check if player is owner of target object
|
||||
_owner = (_playerUID == _targetOwner);
|
||||
|
||||
[_owner, _friendly]
|
||||
Reference in New Issue
Block a user