mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Merge pull request #1918 from oiad/master
Add DZE_limitPlots so admins can limit plot poles to 1 per UID.
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -590,7 +590,7 @@ if (_canBuild select 0) then {
|
||||
};
|
||||
if (DZE_GodModeBase && {!(_classname in DZE_GodModeBaseExclude)}) then {
|
||||
_tmpbuilt addEventHandler ["HandleDamage",{false}];
|
||||
_tmpbuilt enableSimulation false;
|
||||
if !(_classname in DZE_isNewStorage) then {_tmpbuilt enableSimulation false;};
|
||||
};
|
||||
} else { //if magazine was not removed, cancel publish
|
||||
deleteVehicle _tmpbuilt;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -606,6 +606,19 @@ if (!isDedicated) then {
|
||||
[(format ["%1<br />%2<br />%3<br />%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
|
||||
|
||||
@@ -12117,6 +12117,10 @@
|
||||
<French>%1 est rempli(e) à %2 pourcents de sa capacité.</French>
|
||||
<Czech>%1 je naplněno do %2 procent kapacity.</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_EPOCH_PLAYER_133">
|
||||
<English>You can only have one active plot pole where you are the plot owner.</English>
|
||||
<German>Du darfst maximal ein Grundstück besitzen.</German>
|
||||
</Key>
|
||||
<Key ID="STR_EPOCH_PLAYER_134">
|
||||
<English>You do not have access to build on this plot.</English>
|
||||
<German>Du darfst auf diesem Grundstück nichts bauen, da du kein eingetragener Eigentümer bist.</German>
|
||||
|
||||
Reference in New Issue
Block a user