So far only tested with 1.8.0.3 should work with any 1.8 version.
1) Addons\dayz_code\compile\fn_selfActions.sqf
find
uncomment the salvage part
2) Addons\dayz_code\actions\salvage_vehicle.sqf
replace salvage_vehicle.sqf with http://pastebin.com/17EL5pA2 (copy and paste from different scripts, all credits to the authors)
find
and adjust to any value you like
3) Addons\dayz_code\actions\salvage.sqf
find
replace with
this fixed (for me) the behavior that vehicle parts could be removed over and over again after server restart when no player had entered the vehicle.
1) Addons\dayz_code\compile\fn_selfActions.sqf
find
Code:
//repairing Vehicles
Code:
//Repairing Vehicles
if ((dayz_myCursorTarget != _cursorTarget) and _isVehicle and !_isMan and _hasToolbox and (damage _cursorTarget < 1)) then {
if (s_player_repair_crtl < 0) then {
dayz_myCursorTarget = _cursorTarget;
_menu = dayz_myCursorTarget addAction [localize "str_actions_rapairveh", "\z\addons\dayz_code\actions\repair_vehicle.sqf",_cursorTarget, 0, true, false, "",""];
_menu1 = dayz_myCursorTarget addAction [localize "str_actions_salvageveh", "\z\addons\dayz_code\actions\salvage_vehicle.sqf",_cursorTarget, 0, true, false, "",""];
s_player_repairActions set [count s_player_repairActions,_menu];
s_player_repairActions set [count s_player_repairActions,_menu1];
s_player_repair_crtl = 1;
} else {
{dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
s_player_repair_crtl = -1;
};
};
2) Addons\dayz_code\actions\salvage_vehicle.sqf
replace salvage_vehicle.sqf with http://pastebin.com/17EL5pA2 (copy and paste from different scripts, all credits to the authors)
find
Code:
if (_damage < 0.11) then { //allow only parts < 10% damage to be salvaged
3) Addons\dayz_code\actions\salvage.sqf
find
Code:
if ((_hitpoint == "HitEngine") or (_hitpoint == "HitFuel")) then {
[_vehicle, _selection, 0.89] call fnc_veh_handleDam;
} else {
[_vehicle, _selection, 1] call fnc_veh_handleDam;
};
replace with
Code:
if ((_hitpoint == "HitEngine") or (_hitpoint == "HitFuel")) then {
[_vehicle, _selection, 0.89, 0, 0, true] call fnc_veh_handleDam;
} else {
[_vehicle, _selection, 1, 0, 0, true] call fnc_veh_handleDam;
};
this fixed (for me) the behavior that vehicle parts could be removed over and over again after server restart when no player had entered the vehicle.
Last edited: