mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Update player_build.sqf
-updated isOnRoad check -added check to deny building tanktraps underground #661
This commit is contained in:
@@ -112,6 +112,7 @@ if((count _offset) <= 0) then {
|
|||||||
|
|
||||||
_isPole = (_classname == "Plastic_Pole_EP1_DZ");
|
_isPole = (_classname == "Plastic_Pole_EP1_DZ");
|
||||||
_isLandFireDZ = (_classname == "Land_Fire_DZ");
|
_isLandFireDZ = (_classname == "Land_Fire_DZ");
|
||||||
|
_isTankTrap = (_classname == "Hedgehog_DZ");
|
||||||
|
|
||||||
_distance = 30;
|
_distance = 30;
|
||||||
_needText = "Plot Pole";
|
_needText = "Plot Pole";
|
||||||
@@ -319,6 +320,14 @@ if (_hasrequireditem) then {
|
|||||||
deleteVehicle _object;
|
deleteVehicle _object;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if((_isTankTrap) and ((_position select 2)< 0)) exitWith {
|
||||||
|
_isOk = false;
|
||||||
|
_cancel = true;
|
||||||
|
_reason = "You cannot place TankTraps underground).";
|
||||||
|
detach _object;
|
||||||
|
deleteVehicle _object;
|
||||||
|
};
|
||||||
|
|
||||||
if(_location1 distance _location2 > 5) exitWith {
|
if(_location1 distance _location2 > 5) exitWith {
|
||||||
_isOk = false;
|
_isOk = false;
|
||||||
_cancel = true;
|
_cancel = true;
|
||||||
@@ -365,7 +374,7 @@ if (_hasrequireditem) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// No building on roads
|
// No building on roads
|
||||||
if (isOnRoad _location) then { _cancel = true; _reason = "Cannot build on a road."; };
|
if (isOnRoad _position) then { _cancel = true; _reason = "Cannot build on a road."; };
|
||||||
|
|
||||||
// No building in trader zones
|
// No building in trader zones
|
||||||
if(!canbuild) then { _cancel = true; _reason = "Cannot build in a city."; };
|
if(!canbuild) then { _cancel = true; _reason = "Cannot build in a city."; };
|
||||||
|
|||||||
Reference in New Issue
Block a user