mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
* 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.
23 lines
867 B
Plaintext
23 lines
867 B
Plaintext
private ["_pos","_plots","_inList"];
|
|
_pos = _this select 0;
|
|
if (_pos < 0) exitWith {};
|
|
_toAdd = (Humans select _pos);
|
|
_friends = TheDoor getVariable ["doorfriends",[]];
|
|
_inList = false;
|
|
{
|
|
if((_x select 0) == (_toAdd select 0)) exitWith { _inList = true; };
|
|
} forEach _friends;
|
|
if(_inList) exitWith { localize "STR_EPOCH_PLOTMANAGEMENT_ADDFRIEND_ALREADYONTHELIST" call dayz_rollingMessages; };
|
|
if(count _friends >= DZE_doorManagementMaxFriends) exitWith { format[localize "STR_EPOCH_PLOTMANAGEMENT_ADDFRIEND_FRIENDLIMIT", DZE_doorManagementMaxFriends] call dayz_rollingMessages; };
|
|
_friends set [count _friends, _toAdd];
|
|
TheDoor setVariable ["doorfriends", _friends, true];
|
|
PVDZ_veh_Save = [TheDoor,"gear"];
|
|
if (isServer) then {
|
|
PVDZ_veh_Save call server_updateObject;
|
|
} else {
|
|
publicVariableServer "PVDZ_veh_Save";
|
|
};
|
|
|
|
call DoorGetFriends;
|
|
call DoorNearbyHumans;
|