Jump to content

[Release] Restrict Building - ** Updated for 1.0.6.2 **


BigEgg

Recommended Posts

@DieTanx or you can use the @BigEgg variable to restrict near of defined areas all objects included the fuel pumps

  RestrictedBuildingZones = [
  ["Balota Airfield", [5158.72, 2518.75, 0], 600],
  ["stary", [6325.6772,7807.7412, 0], 600],
  ["bash", [4063.4226,11664.19, 0], 600],
  ["klen", [11447.472,11364.504, 0], 600],
  ["bandit", [1606.6443,7803.5156, 0], 600],
  ["hero", [12944.227,12766.889, 0], 600],
  ["whole", [4361.4937,2259.9526, 0], 600],
  ["air", [12060,12640, 0], 600]
 ]; 

 

Link to comment
Share on other sites

  On 4/14/2017 at 8:18 PM, theduke said:

Is there a way to prevent players from being able to place a safe without a plot pole?

Expand  

Epoch has a built in global require plot check: https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/compile/dze_buildChecks.sqf#L8

Then it has a per item require plot check: https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/compile/dze_buildChecks.sqf#L12

Which gets evaluated here: https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/compile/dze_buildChecks.sqf#L66

So you could just do

if (_className in ["VaultStorageLocked","LockboxStorageLocked"]) then {_requirePlot = 1;};

After this code block: https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/compile/dze_buildChecks.sqf#L15 to force a plot pole being needed for safes/lockboxes.

Link to comment
Share on other sites

  On 4/14/2017 at 11:17 PM, salival said:

Epoch has a built in global require plot check: https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/compile/dze_buildChecks.sqf#L8

Then it has a per item require plot check: https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/compile/dze_buildChecks.sqf#L12

Which gets evaluated here: https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/compile/dze_buildChecks.sqf#L66

So you could just do

if (_className in ["VaultStorageLocked","LockboxStorageLocked"]) then {_requirePlot = 1;};

After this code block: https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/compile/dze_buildChecks.sqf#L15 to force a plot pole being needed for safes/lockboxes.

Expand  

I can confirm this works great!  Many thanks salival!!

Link to comment
Share on other sites

  • 3 weeks later...

Ok, once again.

I installed this letter for letter on my server.

The server starts up with no errors in the RPT.

Then a player start deploying a plot, somewhere on the map, not in restricted areas. It was his first plot. Nothing happend. He starts deploying a second time and became the message "allready in progress".

I try the same, deploy a plot. Same effect as the player. Nothing in server RPT, nothing in client RPT.

Then a player start building a wooden wall on his base. Nothing. Dosen´t work. No errors shown up.

 

This is the part of my init.sqf

spawnShoremode = 0; // Random spawn locations  1 = on shores, 0 = inland
EpochUseEvents = false; //Enable event scheduler. Define custom scripts in dayz_server\modules to run on a schedule.
EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]];
// EPOCH CONFIG VARIABLES END //

LimitPlotPoles = true; // Limit the amount of plot poles a player can own?
if (LimitPlotPoles) then {
	PlotPoleLimit = 1; // Amount of plot poles each individual player is allowed to own
};

LimitBuildHeight = true; // Limit the maximum height a player can build at
if (LimitBuildHeight) then {
	MaxBuildHeight = 80; // Maximum build height in meters
};

// Restrict building near specific buildings
BlacklistedBuildings = [
//  ["What text will say", "Class name of building you want to block", Distance around that building to block (radius in meters)]
	["Traders and Military Installations", "FlagCarrierPOWMIA_EP1", 500]
];

diag_log 'dayz_preloadFinished reset';
dayz_preloadFinished=nil;
onPreloadStarted "diag_log [diag_tickTime,'onPreloadStarted']; dayz_preloadFinished = false;";

This is my custom compiles.sqf

if (isServer) then {
	diag_log "Loading custom server compiles";	
};

if (!isDedicated) then {
	diag_log "Loading custom client compiles";
	
	fnc_usec_selfactions = compile preprocessFileLineNumbers "dayz_code\compile\fn_selfActions.sqf";
	
	dze_buildChecks = compile preprocessFileLineNumbers "custom\dze_buildChecks.sqf";
};

The path where dze_buildChecks.sqf is, should be correct.

 

Link to comment
Share on other sites

  On 5/2/2017 at 8:31 AM, Anhor said:

Ok, once again.

I installed this letter for letter on my server.

The server starts up with no errors in the RPT.

Then a player start deploying a plot, somewhere on the map, not in restricted areas. It was his first plot. Nothing happend. He starts deploying a second time and became the message "allready in progress".

I try the same, deploy a plot. Same effect as the player. Nothing in server RPT, nothing in client RPT.

Then a player start building a wooden wall on his base. Nothing. Dosen´t work. No errors shown up.

 

This is the part of my init.sqf

spawnShoremode = 0; // Random spawn locations  1 = on shores, 0 = inland
EpochUseEvents = false; //Enable event scheduler. Define custom scripts in dayz_server\modules to run on a schedule.
EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]];
// EPOCH CONFIG VARIABLES END //

LimitPlotPoles = true; // Limit the amount of plot poles a player can own?
if (LimitPlotPoles) then {
	PlotPoleLimit = 1; // Amount of plot poles each individual player is allowed to own
};

LimitBuildHeight = true; // Limit the maximum height a player can build at
if (LimitBuildHeight) then {
	MaxBuildHeight = 80; // Maximum build height in meters
};

// Restrict building near specific buildings
BlacklistedBuildings = [
//  ["What text will say", "Class name of building you want to block", Distance around that building to block (radius in meters)]
	["Traders and Military Installations", "FlagCarrierPOWMIA_EP1", 500]
];

diag_log 'dayz_preloadFinished reset';
dayz_preloadFinished=nil;
onPreloadStarted "diag_log [diag_tickTime,'onPreloadStarted']; dayz_preloadFinished = false;";

This is my custom compiles.sqf

if (isServer) then {
	diag_log "Loading custom server compiles";	
};

if (!isDedicated) then {
	diag_log "Loading custom client compiles";
	
	fnc_usec_selfactions = compile preprocessFileLineNumbers "dayz_code\compile\fn_selfActions.sqf";
	
	dze_buildChecks = compile preprocessFileLineNumbers "custom\dze_buildChecks.sqf";
};

The path where dze_buildChecks.sqf is, should be correct.

 

Expand  

If there are no errors then I honestly wouldn't know where to begin. I am not having this issue, nor is anyone else. Would you mind posting your client and server rpt logs (be sure to use spoilers)?

Link to comment
Share on other sites

  On 5/2/2017 at 2:40 PM, juandayz said:

@BigEgg @Anhor 

its not a bad exit from dayz_actioninprogress  variable  ?

Expand  

I mean, that would be weird. @Anhor, could you also post your dze_buildChecks.sqf?

 

@juandayz, here is the code that sets dayz_actioninprogress to false.

if (_cancel) exitWith {
    	dayz_actionInProgress = false;
	_reason call dayz_rollingMessages;
	[false, _isPole];
};

All of the restrictions that I added in this script go through this block of code if they are met. 

Link to comment
Share on other sites

Sure. Here it is

  Reveal hidden contents

I only delete the area part. No need for me.

If you both, @BigEgg and @juandayz says all is ok, I give it a second try and record new RPT files (server and client)

 

 

Edited by Anhor
Link to comment
Share on other sites

@BigEgg yup i know its also works fine for me

if (_cancel) exitWith {
    	dayz_actionInProgress = false;
	_reason call dayz_rollingMessages;
	[false, _isPole];
};

 

@Anhor  for example if u build a plot and try to do something more like craft a wall.. you have the "already in progress"? or its just when you put a second plot?

 

Link to comment
Share on other sites

  On 5/2/2017 at 3:24 PM, juandayz said:

 

@Anhor  for example if u build a plot and try to do something more like craft a wall.. you have the "already in progress"? or its just when you put a second plot?

 

Expand  

I died and then I deconstruct my pole (works perfect). After that, I try to redeploy the pole ........ and nothing happens. As I click a second time "deploy plot pole" the message "allready in progress" appears on my screen ....... but nothing happend for minutes. Meanwhile I can do what ever I want.

 

Link to comment
Share on other sites

  On 5/2/2017 at 3:27 PM, juandayz said:

@BigEgg  @Anhor  also thers another thing i have the

dze_buildChecks

call    into   if (!isDedicated) then {  section

not in isDedicated.

Expand  

No, it needs to be in (isDedicated).

 

@Anhor, it appears that this script is working fine. Perhaps it is another script that you have installed causing the issue.

Link to comment
Share on other sites

  • 2 months later...
  On 7/26/2017 at 6:06 PM, DAKA said:

Have this installed, but I cant build at all now. Sorry, I can place my plot pole, but get no options to remove or maintain, i can place items, like half wall, but unable to upgrade it.

 

Expand  

This script wouldn't cause this to happen. What have you changed in your fn_selfActions?

Link to comment
Share on other sites

  Reveal hidden contents
  Reveal hidden contents

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Advertisement
×
×
  • Create New...