diff --git a/CHANGE LOG 1.0.6.2.txt b/CHANGE LOG 1.0.6.2.txt index e34b28307..f0702de0c 100644 --- a/CHANGE LOG 1.0.6.2.txt +++ b/CHANGE LOG 1.0.6.2.txt @@ -1,4 +1,5 @@ [NEW] Added a few loot positions for Namalsk and Takistan. @skigoggles +[NEW] Added DZE_limitPlots so admins can limit plot poles to 1 per UID, disabled by default. @oiad [UPDATED] Zombie pathing. Zeds should now run more direct to players. diff --git a/SQF/dayz_code/compile/dze_buildChecks.sqf b/SQF/dayz_code/compile/dze_buildChecks.sqf index 224a057d7..defb989d8 100644 --- a/SQF/dayz_code/compile/dze_buildChecks.sqf +++ b/SQF/dayz_code/compile/dze_buildChecks.sqf @@ -1,5 +1,5 @@ //Checks if item is near a plot, if the player is plot owner or friendly, if there are too many items, and if the player has required tools -private ["_requireplot","_distance","_canBuild","_friendlies","_nearestPole","_ownerID","_pos","_item","_classname","_isPole","_isLandFireDZ","_IsNearPlot","_buildables","_center","_toolCheck","_plotcheck","_buildcheck","_isfriendly","_isowner","_require","_text","_near"]; +private ["_requireplot","_distance","_canBuild","_friendlies","_nearestPole","_ownerID","_pos","_item","_classname","_isPole","_isLandFireDZ","_IsNearPlot","_buildables","_center","_toolCheck","_plotcheck","_buildcheck","_isfriendly","_isowner","_require","_text","_near","_hasPole"]; _pos = _this select 0; _item = _this select 1; @@ -16,6 +16,7 @@ _isPole = (_classname == "Plastic_Pole_EP1_DZ"); _isLandFireDZ = (_classname == "Land_Fire_DZ"); _canBuild = false; +_hasPole = false; _nearestPole = objNull; _ownerID = 0; _friendlies = []; @@ -23,6 +24,7 @@ _friendlies = []; if (_isPole) then { _plotcheck = [player, true] call FNC_find_plots; _distance = DZE_PlotPole select 1; + if (DZE_limitPlots && {!((getPlayerUID player) in DZE_PlotManagementAdmins)}) then {_hasPole = call FNC_plotCheck;}; } else { _plotcheck = [player, false] call FNC_find_plots; _distance = DZE_PlotPole select 0; @@ -33,6 +35,8 @@ _nearestPole = _plotcheck select 2; if (_isPole && {_IsNearPlot > 0}) exitWith {dayz_actionInProgress = false; format[localize "str_epoch_player_44",_distance] call dayz_rollingMessages; [_canBuild, _isPole];}; +if (_hasPole) exitWith {dayz_actionInProgress = false; localize "STR_EPOCH_PLAYER_133" call dayz_rollingMessages; [_canBuild, _isPole];}; + if (_IsNearPlot == 0) then { if (_requireplot == 0 || {_isLandFireDZ}) then { _canBuild = true; diff --git a/SQF/dayz_code/configVariables.sqf b/SQF/dayz_code/configVariables.sqf index 2c82c484a..5e57bd93a 100644 --- a/SQF/dayz_code/configVariables.sqf +++ b/SQF/dayz_code/configVariables.sqf @@ -79,6 +79,7 @@ DZE_plotManagementMustBeClose = false; //Players must be within 10m of pole to b DZE_PlotManagementAdmins = []; //Array of admin PlayerUIDs. UIDs in this list are able to access every pole's management menu and delete or build any buildable with a pole nearby. DZE_MaxPlotFriends = 10; //Max friends allowed on a plot. There is no character limit in the inventory field of the database, but lower values limit the max global setVariable size to improve performance. DZE_maintainCurrencyRate = 100; //The currency rate of what maintaining an item will be, for instance: at 100, 10 items will have a worth of 1000 (1 10oz gold or 1k coins) see actions/maintain_area.sqf for more examples. +DZE_limitPlots = false; // Limit the amount of plot poles per person to 1, UIDS in the DZE_PlotManagementAdmins array are exempt. DZE_isRemovable = ["Plastic_Pole_EP1_DZ"]; //Items that can be removed with a crowbar with no ownership or access required. To forbid base take overs remove plot pole from this list and add it to DZE_restrictRemoval. It is not necessary to add wrecks or items that inherit from 'BuiltItems' to this list. DZE_restrictRemoval = ["Fence_corrugated_DZ","M240Nest_DZ","ParkBench_DZ","FireBarrel_DZ","Scaffolding_DZ","CanvasHut_DZ","LightPole_DZ","DeerStand_DZ","MetalGate_DZ","StickFence_DZ"]; //Items that can be removed with a crowbar only with proper ownership or access. It is not necessary to add doors, storage or items that inherit from 'ModularItems' to this list. Items that inherit from 'BuiltItems' can be added to this list if desired. @@ -115,4 +116,4 @@ dayz_requireRadio = false; // Require players to have a radio on their toolbelt Variables that are map specific or frequently changed should be included in init.sqf by default with a corresponding if(isNil)then{}; in variables.sqf. -*/ \ No newline at end of file +*/ diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index cac335325..488ada589 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -605,6 +605,19 @@ if (!isDedicated) then { [(format ["%1
%2
%3
%4",death_1,death_2,death_3,death_4]),(safeZoneX + _offset),safeZoneY,10,0,0,8000] spawn BIS_fnc_dynamicText; }; + fnc_plotCheck = { + private ["_hasPole","_plotFriends"]; + + _hasPole = false; + + { + _plotFriends = _x getVariable ["plotfriends",[]]; + if (((_plotFriends select 0) select 0) == dayz_playerUID) exitWith {_hasPole = true;}; + } count (entities "Plastic_Pole_EP1_DZ"); + + _hasPole + }; + dayz_originalPlayer = player; // database trader menu diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index a3026bb88..3d65dabae 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -12117,6 +12117,9 @@ %1 est rempli(e) à %2 pourcents de sa capacité. %1 je naplněno do %2 procent kapacity. + + You can only have one active plot pole where you are the plot owner. + You do not have access to build on this plot. Du darfst auf diesem Grundstück nichts bauen, da du kein eingetragener Eigentümer bist.