Jump to content

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


BigEgg

Recommended Posts

10 hours ago, _Lance_ said:

Hey BigEgg, I noticed plot pole limits and plot size limits are merged into 1062, if I add this just to get the location restrictions and I don't add the parts about plot pole limits and plot sizes to the init - think this'll work? Guess I'm about to find out :D

Hey Lance, I will have this updated in a couple hours when I am able to get on my P.C. Thanks for reminding me!

Link to comment
Share on other sites

Sorry that took so long but I wanted to be sure - all I did was empty my dze_buildChecks.sqf and paste in the new code, verified I only had the buildings and cities blacklists in init.sqf - when on the server I am unable to build a plot pole anywhere, no message. Nothing in server RPT but these were in my client RPT:

Spoiler

......"dayz_preloadFinished reset".....
....."Loading custom client compiles".....
Error in expression <all fnc_getPos;
_chk = count(nearObjects[_pos, [_x select 1], _dis]);

if (_chk >
  Error position: <[_pos, [_x select 1], _dis]);

if (_chk >
  Error Missing )
File mpmissions\__CUR_MP.Chernarus\scripts\BuildingRestrictions\dze_buildChecks.sqf, line 121
Error in expression <all fnc_getPos;
_chk = count(nearObjects[_pos, [_x select 1], _dis]);

if (_chk >
  Error position: <[_pos, [_x select 1], _dis]);

if (_chk >
  Error Missing )
File mpmissions\__CUR_MP.Chernarus\scripts\BuildingRestrictions\dze_buildChecks.sqf, line 121

//---------------------------------------------------------------------------------------------------

.....[283.405,"onPreloadFinished"]....
Error in expression < _this, true] call dze_buildChecks;
if (_canBuild select 0) then {
_classname = >
  Error position: <_canBuild select 0) then {
_classname = >
  Error Undefined variable in expression: _canbuild
File z\addons\dayz_code\actions\modular_build.sqf, line 90

 

 

Link to comment
Share on other sites

7 minutes ago, _Lance_ said:

Sorry that took so long but I wanted to be sure - all I did was empty my dze_buildChecks.sqf and paste in the new code, verified I only had the buildings and cities blacklists in init.sqf - when on the server I am unable to build a plot pole anywhere, no message. Nothing in server RPT but these were in my client RPT:

  Hide contents


......"dayz_preloadFinished reset".....
....."Loading custom client compiles".....
Error in expression <all fnc_getPos;
_chk = count(nearObjects[_pos, [_x select 1], _dis]);

if (_chk >
  Error position: <[_pos, [_x select 1], _dis]);

if (_chk >
  Error Missing )
File mpmissions\__CUR_MP.Chernarus\scripts\BuildingRestrictions\dze_buildChecks.sqf, line 121
Error in expression <all fnc_getPos;
_chk = count(nearObjects[_pos, [_x select 1], _dis]);

if (_chk >
  Error position: <[_pos, [_x select 1], _dis]);

if (_chk >
  Error Missing )
File mpmissions\__CUR_MP.Chernarus\scripts\BuildingRestrictions\dze_buildChecks.sqf, line 121

//---------------------------------------------------------------------------------------------------

.....[283.405,"onPreloadFinished"]....
Error in expression < _this, true] call dze_buildChecks;
if (_canBuild select 0) then {
_classname = >
  Error position: <_canBuild select 0) then {
_classname = >
  Error Undefined variable in expression: _canbuild
File z\addons\dayz_code\actions\modular_build.sqf, line 90

 

 

Yup you did everything right. I have updated the code again (I don't have a test server going atm due to me reformatting my dedi). It should fix it, if not, please let me know. Thanks for helping me out :) Dumb mistake haha

Link to comment
Share on other sites

5 minutes ago, BigEgg said:

Yup you did everything right. I have updated the code again (I don't have a test server going atm due to me reformatting my dedi). It should fix it, if not, please let me know. Thanks for helping me out :) Dumb mistake haha

Alright give me a few mins and I'll let you know what I get, thanks.

Link to comment
Share on other sites

  • 3 weeks later...
57 minutes ago, kingpapawawa said:

@BigEgg any way to block building above roads? Or make a setting that it has to be at least X meters above it.

Currently Epoch is using isOnRoad to check that. I don't think there is a way to check the height on that. The only solution that comes to my mind is using nearRoads. When building, you would have to check whether this gives something back and if the given back array is filled you have to cancel the building because roads are near but that would mean it blocks building near roads in general not only in height.

Link to comment
Share on other sites

  • 1 month later...

should add this

variables.sqf

objects_requirePlot = ["FuelPump_DZ","LockboxStorageLocked","LockboxStorage","VaultStorage","VaultStorageLocked","TentStorage","TentStorageDomed","TentStorageDomed2"];

dze_buildChecks.sqf (merge)

_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
_requireplot = DZE_requireplot;

if (isNumber (configFile >> "CfgVehicles" >> _classname >> "requireplot")) then {
	_requireplot = getNumber(configFile >> "CfgVehicles" >> _classname >> "requireplot");
};

if (_classname in objects_requirePlot) then {
_requireplot = 1;
};

this idea was not mine just got it from old snap build addon

Link to comment
Share on other sites

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