Strip vehicles for parts

I've gotten this working using the guides as well as looking through each file to make sure everything is pointed to the right places instead of addons\dayz_code\ectt.. and putting all of the files in the root of PBO and adjusting the paths as mentioned before.

was not at all like the guide instructed, i'm glad the guide was there but it is incomplete or does not explain the entire process.

on another note, anyone that has gotten this working.. some times my servers vehicles eat parts. not sure what causes this.. but now that i've added this scripting.. you can also continue removing parts from the cars. making this mod a really easy way to get unlimited parts. does anyone else have this issue with their server and is there any good way to fix it?

if anyone needs help getting this installed you can feel free to ask me. i might be able to help some
 
I've gotten this working using the guides as well as looking through each file to make sure everything is pointed to the right places instead of addons\dayz_code\ectt.. and putting all of the files in the root of PBO and adjusting the paths as mentioned before.

was not at all like the guide instructed, i'm glad the guide was there but it is incomplete or does not explain the entire process.

on another note, anyone that has gotten this working.. some times my servers vehicles eat parts. not sure what causes this.. but now that i've added this scripting.. you can also continue removing parts from the cars. making this mod a really easy way to get unlimited parts. does anyone else have this issue with their server and is there any good way to fix it?

if anyone needs help getting this installed you can feel free to ask me. i might be able to help some

Here's what we've found out in my community:

If you "own" a vehicle by getting in it, you are able to take parts off only once per item, and when you repair it works. But if you don't "own" the vehicle because you're not the last person to get in drivers seat, you can take infinite parts off, but repairing it does not work.
 
Hi Guys,

Not working, no errors on startup, but unable to remove items from good or damaged vehicles??

Fully repaired vehicle gives no scroll menu.

Vehicle with orange engine, wheels and red glass only gives option to repair, not remove.

Awesome, IT WORKS!!! Wonderful.

Thank you again for all your help.

Cheers

How did you fix it i have a similar problem
 
this weekend I've played with some scripts, regarding the removal of vehicle parts/repairing. Found some cool stuff at DayzEpoch.

In fn_selfActions.sqf find:

Code:
//Repairing Vehicles
    if ((dayz_myCursorTarget != cursorTarget) and _isVehicle and !_isMan and _hasToolbox and (damage cursorTarget < 1)) then {
        _vehicle = cursorTarget;
        {dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
        dayz_myCursorTarget = _vehicle;
 
        _allFixed = true;
        _hitpoints = _vehicle call vehicle_getHitpoints;
     
        {
            _damage = [_vehicle,_x] call object_getHit;
            _part = "PartGeneric";
         
            //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;
             
            if(["Engine",_x,false] call fnc_inString) then {
                _part = "PartEngine";
            };
                 
            if(["HRotor",_x,false] call fnc_inString) then {
                _part = "PartVRotor"; //yes you need PartVRotor to fix HRotor LOL
            };
 
            if(["Fuel",_x,false] call fnc_inString) then {
                _part = "PartFueltank";
            };
         
            if(["Wheel",_x,false] call fnc_inString) then {
                _part = "PartWheel";
 
            };
                 
            if(["Glass",_x,false] call fnc_inString) then {
                _part = "PartGlass";
            };
 
            // get every damaged part no matter how tiny damage is!
            if (_damage > 0) then {
             
                _allFixed = false;
                _color = "color='#ffff00'"; //yellow
                if (_damage >= 0.5) then {_color = "color='#ff8800'";}; //orange
                if (_damage >= 0.9) then {_color = "color='#ff0000'";}; //red
 
                _string = format["<t %2>Repair%1</t>",_cmpt,_color]; //Repair - Part
                _handle = dayz_myCursorTarget addAction [_string, "\z\addons\dayz_code\actions\repair.sqf",[_vehicle,_part,_x], 0, false, true, "",""];
                s_player_repairActions set [count s_player_repairActions,_handle];
 
            };
                 
        } forEach _hitpoints;
        if (_allFixed) then {
            _vehicle setDamage 0;
        };
    };

Replace it with:

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 {
 
            _vehicle = cursorTarget;
            dayz_myCursorTarget = _vehicle;
 
            _menu = dayz_myCursorTarget addAction ["Repair Vehicle", "salvage\repair_vehicle.sqf",_vehicle, 0, true, false, "",""];
            _menu1 = dayz_myCursorTarget addAction ["Salvage Vehicle", "salvage\salvage_vehicle.sqf",_vehicle, 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;
        };
    };

Find:

Code:
    //Engineering
    {dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
    dayz_myCursorTarget = objNull;

replace with:

Code:
//Engineering
    {dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
    s_player_repair_crtl = -1;
 
    dayz_myCursorTarget = objNull;
 
    {player removeAction _x} forEach s_player_parts;s_player_parts = [];


Now we need to make a folder called salvage in the mission folder. In that folder we're gonna create 5 files.

repair.sqf
repair_cancel.sqf
repair_vehicle.sqf
salvage.sqf
salvage_vehicle.sqf

This code basically works and looking at it/playing with it, there should be no problems regarding vehicle owners.
But! It has one major bug that i couldn't figure out. When entering the Salvage menu it lists ALL the available hitparts. Even if you look at a Skoda you'll get the options to salvage Middle Wheels etc. This of course lets you strip those parts endlessly, couse the part actually gets salvaged and saved to you inventory.
I know this code has a lot of useless stuff from the DayzEpoch mod that we're not gonna use ever.
Maybe someone smarter then me can clean it up a little and solve the Salvage menu bug.
 
I skimmed through the entire thread and noticed that other people are having the same issue with removing infinite of a part and some parts not repairing properly. However, I am having another issue that I didn't see mentioned. Has anyone else been having the issue of some vehicles not getting fueled properly from jerry cans?
 
Are these issues from pure Reality builds running chernarus ?

Yes. I am running a normal DayZ Chernarus 1.7.6.1 map, hosted through DayZ.ST. It also seems that, sometimes, if another player jumps into the driver seat and then gets back out, then the refuel will start to work properly again. However, this is not always the case and could be unrelated.
 
The fuel issue is a DayZ 1.7.6 problem. Some type of "owner" thing. this might be what is causing the vehicle parts issues as well.
 
The fuel issue is a DayZ 1.7.6 problem. Some type of "owner" thing. this might be what is causing the vehicle parts issues as well.

Okay, thanks for the reply. I just wanted to verify I didn't enter the script incorrectly or anything. Hopefully someone will release a fix for this.
 
No problem. I had this issue as soon as I updated my server to 1.7.6. Hasnt messed with me too much. The strip vehicles might. I have yet to implement this to live.
 
Guys i have seen severel scripts now what's the best script to use? Right now im using Jaimbo's one and having and issue with it i get the options to remove parts but it doesnt do anything help please! ;) Would be much apreciated
 
If I override compiles.sqf on DayzTaviana.com 2.0 -map, harvesting wood breaks and game doensn't recognize forest so I don't understand the logic of those selfactions, how come others wont work when using compiles.sqf on mission file. In compiles.sqf I'm only overriding fnc_usec_selfActions.sqf...
 
This was very simple to get working for me, but there is one major issue that I have with the script. Wondering if others have the same problem.

I can remove all the parts from the vehicle perfectly fine. The big problem is going into my database and looking at the vehicle all the parts were removed from. Each part shows missing for hit points, but the damage shows at 0% damaged. That means even though I have my damaged vehicle script set to remove\respawn vehicles with more then 60% damage that vehicle won't be removed\respawned. Eventually I would end up with completely damaged vehicles sitting around everywhere because the database doesn't think they have any % damaged. Anyone else having the issue?

Running the DayZ Control Center
 
Blender PM me. We have it working.

Cen, did yo manage to work out the bugs? Mine works but has disabled wood harvesting and also has the issue that if the vehicle is not assigned to a player is can be harvested endlessly. Would love to know if you have the fix for this!
 
Not yet, having issues with parts being removed and re-added and being full green, so in theory the vehicle can always be repaired which isn't good.
 
We are only having this problem when running up to a fresh spawn vehicle and attempting to remove a part. If the player gets into the drivers seat or access the gear first, this option goes away and only each good condition part can be taken once as it actual removes it from the vehicle. I have not pointed this out to my players nor have any of them mentioned it to me, but i have a suspicion that they are doing the same as me and just not saying, lol.
 
Back
Top