Jump to content

Fix use Wood Ladder bug into base issue.


J.Dominic

Recommended Posts

Issue video: http://dai.ly/x5887s0

If your server set DZE_requireplot like this

DZE_requireplot = 0;

All players can place building objects every where and Wood Ladder is a big problem.

 

Require files

1. Custom compiles.sqf

2. Custom modular_build.sqf

 

1. Copy compiles.sqf from

@DayZ_Epoch\addons\dayz_code\init

To

MPMissions\DayZ_Epoch_11.Chernarus\custom

 

2. Find compiles.sqf path in init.sqf

call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";

Change to

call compile preprocessFileLineNumbers "custom\compiles.sqf";

 

3. Copy modular_build.sqf from

@DayZ_Epoch\dayz_code\actions

To

MPMissions\DayZ_Epoch_11.Chernarus\custom

 

4. Edit modular_build.sqf path in custom compiles.sqf

From

player_build = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\modular_build.sqf";

To

player_build = compile preprocessFileLineNumbers "custom\modular_build.sqf";

 

5. Add not allow place wood ladder into modular_build.sqf but i have 2 versions for script you can choose

1. Not allow place wood ladder every where.

Spoiler

 

find:


_classname = getText (configFile >> "CfgMagazines" >> DZE_buildItem >> "ItemActions" >> "Build" >> "create");
_classnametmp = _classname;

below paste:


if (_classname isKindOf "WoodLadder_DZ") exitWith {
dayz_actionInProgress = false;
systemChat("Object Not Allowed in this server");
};

 

2. You can place wood ladder but not near of any objects you can set

Spoiler

 

find:


_classname = getText (configFile >> "CfgMagazines" >> DZE_buildItem >> "ItemActions" >> "Build" >> "create");
_classnametmp = _classname;

below paste:


_playerPos = getPosATL player;
_NOTALLOW = ["WoodSmallWall_DZ","CinderWallHalf_DZ","CinderWall_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorway_DZ","WoodSmallWallThird_DZ",
"WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","Land_DZE_WoodDoor","Land_DZE_WoodDoorLocked","Land_DZE_GarageWoodDoor","Land_DZE_GarageWoodDoorLocked","WoodLargeWall_DZ",
"WoodLargeWallWin_DZ","WoodLargeWallDoor_DZ","Land_DZE_LargeWoodDoor","Land_DZE_LargeWoodDoorLocked"];

_nearRestr = count nearestObjects [_playerPos, _NOTALLOW, 5] > 0;

if (_nearRestr && (_classname isKindOf "WoodLadder_DZ") or (_classname isKindOf "WoodStairs_DZ") or (_classname isKindOf "WoodStairsSans_DZ") ) exitWith {
dayz_actionInProgress = false;
systemChat("This Object is Not Allowed near of a wall");
};

 

Remember the private section for _playerpos _nearrest and _NOTALLOW variables

You can set objects for not allow place wood ladder near.


I give all credit to @juandayz because he create this script ;)

 

How to remove this

=================

\/\/\/\/\/\/\/\/\/\/\/\/\/

  Hide contents

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...