BigEgg Posted March 24, 2017 Report Share Posted March 24, 2017 Vehicles indestructible within plot is part of Epoch 1.0.7.1 now. Looked around and saw that some people were requesting this, it is actually quite simple: What it does: Makes vehicles indestructible within the plot area (default 30 meters) , but only if they are locked and no players are in them. Step 1: In your custom compiles.sqf add: (NOTE - CHANGE THE FILE PATH TO FIT YOUR NEEDS) fnc_veh_handleDam = compile preprocessFileLineNumbers "FILE\PATH\HERE\veh_handleDam.sqf"; below the if (!isDedicated) code block. Example: if (!isDedicated) then { /*************/ /* Code Here */ /*************/ }; fnc_veh_handleDam = compile preprocessFileLineNumbers "FILE\PATH\HERE\veh_handleDam.sqf"; Step 2: Copy veh_handleDam.sqf into your mission file from \z\addons\dayz_code\compile\veh_handleDam.sqf Step 3: In veh_handleDam.sqf find: _total = _this select 2; Below it add: if (locked _unit && {count (crew _unit) == 0} && {count (_unit nearEntities ["Plastic_Pole_EP1_DZ", DZE_PlotPole select 0]) > 0}) exitWith {0}; Done! NOTE: You can change the distance it applies to by changing the DZE_PlotPole variable: DZE_PlotPole = [30,90]; Or, you can set it independent of the variable by changing it to this: if (locked _unit && {count (crew _unit) == 0} && {count (_unit nearEntities ["Plastic_Pole_EP1_DZ", 40]) > 0}) exitWith {0}; and modifying the number (in this case it is 40) to whatever you would like. Keep in mind that the number represents the radius from the plot pole in meters. Hooty, DieTanx, Bricktop and 7 others 8 2 Link to comment Share on other sites More sharing options...
looter809 Posted March 24, 2017 Report Share Posted March 24, 2017 Thank you, I will test this out very soon :) <3 Link to comment Share on other sites More sharing options...
Hooty Posted March 24, 2017 Report Share Posted March 24, 2017 No need to test I'm sure. @BigEgg knows his stuff. You just made a lot of folks very happy. looter809, BigEgg, juandayz and 1 other 4 Link to comment Share on other sites More sharing options...
Jestertriks Posted March 24, 2017 Report Share Posted March 24, 2017 still vehicles have to be empty and locked correct? there can be no items in them? Link to comment Share on other sites More sharing options...
BigEgg Posted March 24, 2017 Author Report Share Posted March 24, 2017 1 hour ago, Jestertriks said: still vehicles have to be empty and locked correct? there can be no items in them? Correct Link to comment Share on other sites More sharing options...
BigEgg Posted March 24, 2017 Author Report Share Posted March 24, 2017 This is good to know - updating post now. Link to comment Share on other sites More sharing options...
theduke Posted March 24, 2017 Report Share Posted March 24, 2017 hmm this didnt work for me. Double checked the instructions and vehicles still take damage. One thing i did notice when i was testing zupas original script, the vehicles never took damage UNTIL i got in the driver seat. Same thing happens here. as soon as i get in the driver seat and lock the vehicle, its able to take damage. Link to comment Share on other sites More sharing options...
BigEgg Posted March 24, 2017 Author Report Share Posted March 24, 2017 5 minutes ago, theduke said: hmm this didnt work for me. Double checked the instructions and vehicles still take damage. One thing i did notice when i was testing zupas original script, the vehicles never took damage UNTIL i got in the driver seat. Same thing happens here. as soon as i get in the driver seat and lock the vehicle, its able to take damage. If you are using safezones, be sure to adjust the path there too. Chances are you have the path set back to default for veh_handleDam.sqf - if you don't adjust it, your client will take that variable and won't call the one in your mission. Link to comment Share on other sites More sharing options...
LunatikCH Posted March 24, 2017 Report Share Posted March 24, 2017 4 minutes ago, theduke said: hmm this didnt work for me. Double checked the instructions and vehicles still take damage. One thing i did notice when i was testing zupas original script, the vehicles never took damage UNTIL i got in the driver seat. Same thing happens here. as soon as i get in the driver seat and lock the vehicle, its able to take damage. are you sure you added fnc_veh_handleDam = compile preprocessFileLineNumbers "FILE\PATH\HERE\veh_handleDam.sqf"; BELOW the isdedicated block? So after the }; it needs to get compiled on both to work, i made this mistake with the first test, i put it inside the { }; from it, it didnt work that way but works if you put it below it Link to comment Share on other sites More sharing options...
theduke Posted March 24, 2017 Report Share Posted March 24, 2017 Just now, BigEgg said: If you are using safezones, be sure to adjust the path there too. Chances are you have the path set back to default for veh_handleDam.sqf - if you don't adjust it, your client will take that variable and won't call the one in your mission. actually im setting up a lingor server atm and dont have safezones yet. and right after i posted the above issue, I realized i was spawning it in with infistar. So i jsut went back in and bought a vehicle. same thing... Link to comment Share on other sites More sharing options...
theduke Posted March 24, 2017 Report Share Posted March 24, 2017 1 minute ago, LunatikCH said: are you sure you added fnc_veh_handleDam = compile preprocessFileLineNumbers "FILE\PATH\HERE\veh_handleDam.sqf"; BELOW the isdedicated block? So after the }; it needs to get compiled on both to work, i made this mistake with the first test, i put it inside the { }; from it, it didnt work that way but works if you put it below it yes i did Link to comment Share on other sites More sharing options...
BigEgg Posted March 24, 2017 Author Report Share Posted March 24, 2017 1 minute ago, theduke said: actually im setting up a lingor server atm and dont have safezones yet. and right after i posted the above issue, I realized i was spawning it in with infistar. So i jsut went back in and bought a vehicle. same thing... Make sure you don't have fnc_veh_handleDam defined anywhere else. This is the only thing I can think of. theduke 1 Link to comment Share on other sites More sharing options...
kingpapawawa Posted March 24, 2017 Report Share Posted March 24, 2017 (edited) edited cause tested and working Edited March 25, 2017 by kingpapawawa tested and working Link to comment Share on other sites More sharing options...
LunatikCH Posted March 24, 2017 Report Share Posted March 24, 2017 not sure if that matters since it is compiled on both, i have tested it 20 minutes with like every possible way of the vehicle beeing in/out of the zone with player in it and not, putting a plot next to the vehilce, removing a plot which is near a vehicle and what not, all works as it should regarding to positive/negative checks theduke 1 Link to comment Share on other sites More sharing options...
BigEgg Posted March 24, 2017 Author Report Share Posted March 24, 2017 Just now, LunatikCH said: not sure if that matters since it is compiled on both, i have tested it 20 minutes with like every possible way of the vehicle beeing in/out of the zone with player in it and not, putting a plot next to the vehilce, removing a plot which is near a vehicle and what not, all works as it should regarding to positive/negative checks Do you have safezones?? theduke 1 Link to comment Share on other sites More sharing options...
LunatikCH Posted March 24, 2017 Report Share Posted March 24, 2017 2 minutes ago, BigEgg said: Do you have safezones?? sure, ofc i made the change for the veh_handleDam in there aswell, as said above, all works as it should theduke 1 Link to comment Share on other sites More sharing options...
BigEgg Posted March 24, 2017 Author Report Share Posted March 24, 2017 Just now, LunatikCH said: sure, ofc i made the change for the veh_handleDam in there aswell, as said above, all works as it should Yeah I am feeling like having safezones and not having them makes a difference. I am going to do some testing on this later. theduke 1 Link to comment Share on other sites More sharing options...
theduke Posted March 24, 2017 Report Share Posted March 24, 2017 ahh ok i just noticed the path in the safezone script... I dont use them yet, but the script is still active. Ill change the path and test again Link to comment Share on other sites More sharing options...
theduke Posted March 24, 2017 Report Share Posted March 24, 2017 I can confirm it is the path in the safezone script that was overriding it...smh.. lol Works as intented. Thanks everyone! LunatikCH, BigEgg, Bricktop and 1 other 4 Link to comment Share on other sites More sharing options...
BigEgg Posted March 24, 2017 Author Report Share Posted March 24, 2017 Just now, theduke said: I can confirm it is the path in the safezone script that was overriding it...smh.. lol Works as intented. Thanks everyone! Excellent haha - was getting worried lol juandayz 1 Link to comment Share on other sites More sharing options...
theduke Posted March 24, 2017 Report Share Posted March 24, 2017 so this whole time i was testing out zupas old script....it probably was working haha ahh well i learnt something new today...check for overrides lol Hooty and Bricktop 2 Link to comment Share on other sites More sharing options...
BigEgg Posted March 25, 2017 Author Report Share Posted March 25, 2017 18 minutes ago, theduke said: so this whole time i was testing out zupas old script....it probably was working haha ahh well i learnt something new today...check for overrides lol Yes haha - very very important that there are no overrides! Link to comment Share on other sites More sharing options...
Bricktop Posted March 25, 2017 Report Share Posted March 25, 2017 @BigEgg Thanks for this man - Works perfect! Hooty and BigEgg 2 Link to comment Share on other sites More sharing options...
theduke Posted April 3, 2017 Report Share Posted April 3, 2017 Ok so yes i've been trying to get the locked vehicles in god mode with gear and over the map... So i was trying way too hard to try to accomplish this lol Simply remove the check for plot pole, done lol if (locked _unit && (count(crew _unit)) == 0) exitWith {}; I've tested this, and it works great even with gear (one weapon and one magazine) I was so overthinking it trying to use zupas old script haha Thx @BigEgg BigEgg, SideShowFreak, Hooty and 1 other 4 Link to comment Share on other sites More sharing options...
gernika Posted April 6, 2017 Report Share Posted April 6, 2017 works fine for me,, tnks! Link to comment Share on other sites More sharing options...
Recommended Posts