Hey guys, i am looking for help.
I have got something like a Script ;-) but it does not work for me. I put it on the bottom of the dayzcode.pbo/init/compiles.sqf:
I have got several problems. First of all it works on Server Restart. After this locked vehicles near the PlotPole are indestructible, but if i unlock it and take place in the drivers seat it will become destrcutible even if i lock it again. Furthermore it stays indestructible after server restart in spite of there is gear in it.
I hope anybody got a solution for that. Please guys i am despaired!
I have got something like a Script ;-) but it does not work for me. I put it on the bottom of the dayzcode.pbo/init/compiles.sqf:
Code:
if (isNil "fnc_vehicle_handleDamage") then {fnc_vehicle_handleDamage = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_handleDamage.sqf";};
vehicle_handleDamage = {
private["_obj","_result","_state"];
_obj = _this select 0;
if ((count(nearestObjects [_obj, ["Plastic_Pole_EP1_DZ"],30]) > 0) && (locked _obj && (count (crew _obj)) == 0) && (count (magazines _obj)) == 0) && (count (weapons _obj)) == 0)) exitWith {_obj allowDamage false;};
_state = false;
{if ((_obj distance (_x select 0)) < 100) then {_state = true;};} forEach safezones;
if (_state) exitWith {_obj allowDamage false;};
_obj allowDamage true;
_result = _this call fnc_vehicle_handleDamage;
_result
};
I have got several problems. First of all it works on Server Restart. After this locked vehicles near the PlotPole are indestructible, but if i unlock it and take place in the drivers seat it will become destrcutible even if i lock it again. Furthermore it stays indestructible after server restart in spite of there is gear in it.
I hope anybody got a solution for that. Please guys i am despaired!