Incar Posted June 16, 2014 Report Share Posted June 16, 2014 This is really basic, but while searching google for info to create various scripts, I've often come across servers allowing players to build on roads, but simply so they can build roadblocks, they'd have rules against building structures. This makes it easier to prevent players from abusing the feature. Grab a copy of player_build.sqf from dayz_code/actions. Add it to your mission files. Open it and at the very top you see private ["_location","_dir","_classname","_item","_hasrequireditem"," add this at the very end ,"_isHedgehog" the search for _isLandFireDZ = (_classname == "Land_Fire_DZ"); below it add _isHedgehog = (_classname == "Hedgehog_DZ"); last search for //No building on roads unless toggled if (!DZE_BuildOnRoads) then { if (isOnRoad _position) then { _cancel = true; _reason = "Cannot build on a road."; }; }; replace it with //No building on roads unless toggled if (!DZE_BuildOnRoads) then { if (isOnRoad _position) then { if (!_isHedgehog) then {_cancel = true; _reason = "Cannot build on a road."; }; }; }; Now I'm assuming you already have a custom compiles in your mission folder. Search for player_build = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_build.sqf"; and change the path to read where you placed your player_build.sqf in your missions. I have no idea how to make cleanup scripts at this time, but in the future I'll see about making one that removes all hedgehogs on roads every restart. Unless someone else decides to get to it before me, then thank you. Unfortunately it's not a big concern for me at this time, still got a lot of other work I gotta do. Now have fun building roadblocks with your TankTraps/Hedgehogs so you can ambush people driving along, hehe. Friendly 1 Link to comment Share on other sites More sharing options...
Friendly Posted June 16, 2014 Report Share Posted June 16, 2014 Nice Idea but I wish it would require more to build a road block other wise people just place tank traps outside of trader citys and people always hit them. Link to comment Share on other sites More sharing options...
Incar Posted June 17, 2014 Author Report Share Posted June 17, 2014 Nice Idea but I wish it would require more to build a road block other wise people just place tank traps outside of trader citys and people always hit them. To resolve that a person could always extend the trader city trigger range in missions.sqm. This would make the message for entering the trader city appear at further ranges, and with safezones may also effect the safezone range, but it's a method. Alternatively new trigger classes could also be made to define other areas that players can't build in. Seeing as the trader city triggers are already present, it's a pretty straight forward task to attempt. If one is willing to take it a bit further, they could make the trigger execute a newly made script which will only prevent building on roads withing the range of the trigger, that way it doesn't effect building bases, but really, building bases near a trader city probably isn't a wise idea, lol. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now