Help - Salvage Vehicles

Same problem here, searching for fix... thinking about to change the fn_selfAction for old one... mby will help...
there are allso other problems, with bloodbag and so on...
 
I have the exact same problem with the vehicle salvaging. Very annoying

EDIT: it probably has something to do with the new inventory system.
It also has other bugs which are really annoying....
 
The fix linked above I posted allows you to dupe car parts.

This fix won't let you do that. Replace the existing code in your fn_selfActions.sqf with this:

Code:
// Remove Parts from Vehicles - By SilverShot.
    if( !_isMan and _canDo and _hasToolbox and (silver_myCursorTarget != cursorTarget) and cursorTarget isKindOf "AllVehicles" and (getDammage cursorTarget < 0.95) ) then {
    _vehicle = cursorTarget;
    _invalidVehicle = (_vehicle isKindOf "Motorcycle") or (_vehicle isKindOf "Tractor"); //or (_vehicle isKindOf "ATV_US_EP1") or (_vehicle isKindOf "ATV_CZ_EP1");
    if( !_invalidVehicle ) then {
    {silver_myCursorTarget removeAction _x} forEach s_player_removeActions;
    s_player_removeActions = [];
    silver_myCursorTarget = _vehicle;
   
    _hitpoints = _vehicle call vehicle_getHitpoints;
   
    {
    _damage = [_vehicle,_x] call object_getHit;
   
    if( _damage < 0.15 ) then {
    private ["_part"];
    //change "HitPart" to " - Part" rather than complicated string replace
    _cmpt = toArray (_x);
    _cmpt set [0,20];
    _cmpt set [1,toArray ("-") select 0];
    _cmpt set [2,20];
    _cmpt = toString _cmpt;
   
    _skip = true;
    if( _skip and _x == "HitFuel" ) then { _skip = false; _part = "PartFueltank"; _cmpt = _cmpt + "tank"};
    if( _skip and _x == "HitEngine" ) then { _skip = false; _part = "PartEngine"; };
    if( _skip and _x == "HitLFWheel" ) then { _skip = false; _part = "PartWheel"; };
    if( _skip and _x == "HitRFWheel" ) then { _skip = false; _part = "PartWheel"; };
    if( _skip and _x == "HitLBWheel" ) then { _skip = false; _part = "PartWheel"; };
    if( _skip and _x == "HitRBWheel" ) then { _skip = false; _part = "PartWheel"; };
    if( _skip and _x == "HitGlass1" ) then { _skip = false; _part = "PartGlass"; };
    if( _skip and _x == "HitGlass2" ) then { _skip = false; _part = "PartGlass"; };
    if( _skip and _x == "HitGlass3" ) then { _skip = false; _part = "PartGlass"; };
    if( _skip and _x == "HitGlass4" ) then { _skip = false; _part = "PartGlass"; };
    if( _skip and _x == "HitGlass5" ) then { _skip = false; _part = "PartGlass"; };
    if( _skip and _x == "HitGlass6" ) then { _skip = false; _part = "PartGlass"; };
    if( _skip and _x == "HitHRotor" ) then { _skip = false; _part = "PartVRotor"; };
   
    if (!_skip ) then {
    _string = format["<t color='#0096ff'>Remove%1</t>",_cmpt,_color]; //Remove - Part
    _handle = silver_myCursorTarget addAction [_string, "\z\addons\ow_assets\actions\ss_remove.sqf",[_vehicle,_part,_x], 0, false, true, "",""];
    s_player_removeActions set [count s_player_removeActions,_handle];
    };
    };
   
    } forEach _hitpoints;
    };
    };
 
    //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;
        };
    };
 
Cen...correct me if I'm wrong....

fn_selfactions needs to go in a "custom" or "fixes" (whatever we name it) folder in the mission PBO. Then we call on this by using: [] execVM "custom\fn_selfactions.sqf"; at the bottom of init.sqf or is this the kind that needs the "call compilePreprocess yada yada yada" in the same place as the other preprocess lines in init.sqf?
 
you will need to grab two files from your client files (@DayZOverwatch\addons\dayz_code.pbo)

compiles.sqf and fn_selfActions.sqf

then in init.sqf change the path to the compiles.sqf and inside compiles.sqf change the path to the fn_selfActions.sqf

You can put the files wherever you want inside the mission.pbo as long as the path is correct.
 
gyro.sqf:

Code:
if (false) then { 
    cutText [format["You are in combat and cannot build a gyrocopter."], "PLAIN DOWN"];
sleep 2;
cutText [format["Make sure you build your gyrocopter somewhere safe and clear of objects."], "PLAIN DOWN"];
} else {
 
_has1 = "PartEngine" in magazines player;
_has2 = "PartVRotor" in magazines player;
 
if (_has2 && _has1) then {
 
//they're ready.
player removeAction s_player_deploygyro;
player playActionNow "Medic";
r_interrupt = false;
player removeWeapon "ItemToolbox";
player removeMagazine "PartEngine";
player removeMagazine "PartVRotor";
_dis=5;
_sfx = "repair";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
 
sleep 10;
 
_object = "GyroC_DZ" createVehicle (position player);
 
_object setVariable ["ObjectID", "1", true];
_object setVariable ["ObjectUID", "1", true];
 
player reveal _object;
 
_smoke = "SmokeshellGreen" createVehicle position _object;
_smoke attachto [_object,[0,0,0]];
 
cutText [format["You've built a gyrocopter! Look for green smoke! How magical!"], "PLAIN DOWN"];
 
r_interrupt = false;
player switchMove "";
player playActionNow "stop";
 
sleep 15;
 
deleteVehicle _smoke;
 
cutText [format["Warning: Spawned gyrocopters DO NOT SAVE after server restart!"], "PLAIN DOWN"];
 
} else {
cutText [format["You need an Engine and a Main Rotor to build this."], "PLAIN DOWN"];
sleep 5;
cutText [format["Make sure you build your gyrocopter somewhere safe and clear of objects."], "PLAIN DOWN"];
};
 
};
//deploy gyro by Player2 - OpenDayz Release Coming Soon!
 
gyro.sqf:

Code:
if (false) then {
    cutText [format["You are in combat and cannot build a gyrocopter."], "PLAIN DOWN"];
sleep 2;
cutText [format["Make sure you build your gyrocopter somewhere safe and clear of objects."], "PLAIN DOWN"];
} else {
 
_has1 = "PartEngine" in magazines player;
_has2 = "PartVRotor" in magazines player;
 
if (_has2 && _has1) then {
 
//they're ready.
player removeAction s_player_deploygyro;
player playActionNow "Medic";
r_interrupt = false;
player removeWeapon "ItemToolbox";
player removeMagazine "PartEngine";
player removeMagazine "PartVRotor";
_dis=5;
_sfx = "repair";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
 
sleep 10;
 
_object = "GyroC_DZ" createVehicle (position player);
 
_object setVariable ["ObjectID", "1", true];
_object setVariable ["ObjectUID", "1", true];
 
player reveal _object;
 
_smoke = "SmokeshellGreen" createVehicle position _object;
_smoke attachto [_object,[0,0,0]];
 
cutText [format["You've built a gyrocopter! Look for green smoke! How magical!"], "PLAIN DOWN"];
 
r_interrupt = false;
player switchMove "";
player playActionNow "stop";
 
sleep 15;
 
deleteVehicle _smoke;
 
cutText [format["Warning: Spawned gyrocopters DO NOT SAVE after server restart!"], "PLAIN DOWN"];
 
} else {
cutText [format["You need an Engine and a Main Rotor to build this."], "PLAIN DOWN"];
sleep 5;
cutText [format["Make sure you build your gyrocopter somewhere safe and clear of objects."], "PLAIN DOWN"];
};
 
};
//deploy gyro by Player2 - OpenDayz Release Coming Soon!

What do I put in fn_selfActions?
 
Code:
//GYRO DEPLOY
if ("ItemToolbox" in _weapons) then {
        hasBikeItem = true;
    } else { hasBikeItem = false;};
if((speed player <= 1) && hasBikeItem && _canDo) then {
if (s_player_deploygyro < 0) then {
s_player_deploygyro = player addaction[("<t color=""#007ab7"">" + ("Deploy GyroCopter") +"</t>"),"deploys\gyro\deploy.sqf","",5,false,true,"", ""];
};
} else {
player removeAction s_player_deploygyro;
s_player_deploygyro = -1;
};
 
Code:
//GYRO DEPLOY
if ("ItemToolbox" in _weapons) then {
        hasBikeItem = true;
    } else { hasBikeItem = false;};
if((speed player <= 1) && hasBikeItem && _canDo) then {
if (s_player_deploygyro < 0) then {
s_player_deploygyro = player addaction[("<t color=""#007ab7"">" + ("Deploy GyroCopter") +"</t>"),"deploys\gyro\deploy.sqf","",5,false,true,"", ""];
};
} else {
player removeAction s_player_deploygyro;
s_player_deploygyro = -1;
};

Thanks!
 
I had issue after adding the deployable into sql . I think it was the DomeTentStorage INSERT INTO `deployable` VALUES ('8', 'DomeTentStorage'); when i removed it it seems to have fixed the issue . Im not 100% but seems to have sorted my prob :)
 
Back
Top