Strip vehicles for parts

yes the error might be depending on dayz code....my mission overwrites the clients dayz_code
variables.sqf, compiles.sqf and fn_selfActions.sqf . I havbe no idea if this causes the problem....Maybe it also can be an error of the Database??

I'm using the 1.7.6.1 versions of variables.sqf , compiles.sqf and fn_selfActions.sqf, maybe that's why I'm not getting those issues? Me and some friends are going online now, we'll see what happens . I'll let you know if we manage to get the same issues you have. . and possibly even a fix for it.
 
I have to put my hands up and say I honestly don't know what the issue is then. I'm getting non of these issues on my server, or at least I've not had them and currently non of my players have been able to see it. Sorry. Maybe someone can get hold of the coder and see what he says ?
 
Nevermind, i got it to work off of the instructions listed. If you change the damage values, then it doesn't work properly. FYI to everyone.
 
Anyone figure out why stripping a red engine from a vehicle gives you an engine... and still lets you drive the car as if it was still in it. Leads to the nasty abuse of removal + putting it back on for full green.
 
I just cant seem to get it working. I am using the a debug monitor script that might be interfering with it. Please help. Thanks

I attached my mission file if anyone is interested in helping or looking what the problem is. I am using chernarus
 

Attachments

  • dayz_mission.pbo
    130.4 KB · Views: 21
I just cant seem to get it working. I am using the a debug monitor script that might be interfering with it. Please help. Thanks

I attached my mission file if anyone is interested in helping or looking what the problem is. I am using chernarus

I'll have a look at this tomorrow...might be caused by the debug\compiles.sqf... try to uncommend that line and start again... i try to fix your mission when i find the time
 
Im sorry if this has been asked. I didn;t want to read through 7 pages of replies. I have the salvageable car parts working on my server. However, when you remove a a piece of the car, it still stays on the car. Is there a way to have it remove the part from the vehicle? EX: If i remove the wheel off one car, it cant be driven. In order to get it working i have to find another wheel.
 
Ok my girlfriend just left, and i looked into your Mission. I have set it up correctly with the scripts of mine.
To Strip parts from vehicles should work now....but i dont reaaly know how to set up the Debug monitor... Maybe you have a look over the compiles.sqf and do the changes in it, so the debug monitor works...

Here is your mission ;)
u just have to rename it or change the name in the config.cfg...
 

Attachments

  • dayz_1.chernarus.pbo
    140.4 KB · Views: 53
Bummer....I see that no one has figured this out for Tavi 2.0 :( Ive taken a small break from it but gonna keep trying.
 
i got it working :D

open init.sqf in your mission.pbo
then replace the Load in compiled functions code
with this code here under

Code:
//Load in compiled functions
//call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf";                //Initilize the Variables (IMPORTANT: Must happen very early)
call compile preprocessFileLineNumbers "dayz_code\init\variables.sqf";                //Initilize the Variables (IMPORTANT: Must happen very early)
progressLoadingScreen 0.1;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf";                //Initilize the publicVariable event handlers
progressLoadingScreen 0.2;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf";    //Functions used by CLIENT for medical
progressLoadingScreen 0.4;
//call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";
call compile preprocessFileLineNumbers "dayz_code\init\compiles.sqf";                //Compile regular functions
progressLoadingScreen 1.0;

Then download the file i uploaded it out it in your mission.pbo
and your done.

there are some stuff what i added for me own server you can keep it or remove it

1 edit compiles there are some stuff in it for me server what i like
2 dont remove compiles.sqf you need that

Hey i allready have stuff added to my Call_compile etc how would i add extra
 
Manatee hunter, follow this tutorial and it will work perfectly:

1. Using the PBO tool of your choice (cPBO, PBOView, PBOManager etc.) extract the "dayz_code.pbo" from the "@dayz" folder.
2. Copy the "compiles.sqf" from "dayz_code\init" into your mission.pbo.
3. In the init.sqf in the mission.pbo edit:

Code:
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";

to

Code:
call compile preprocessFileLineNumbers "compiles.sqf";

You can use the compiles.sqf to override majority of the files in "dayz_code\compile" folder. We are going to use it to override the function "fn_selfAction.sqf" so:

4. Copy the "fn_selfAction.sqf" in "dayz_code\compile" to your mission.pbo

5. Open the compiles.sqf and find:

Code:
    fnc_usec_selfActions =        compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_selfActions.sqf";        //Checks which actions for self

(Should be on line 17)

and edit it so it looks like this

Code:
    fnc_usec_selfActions =        compile preprocessFileLineNumbers "fn_selfActions.sqf";        //Checks which actions for self

Now we can edit the fn_selfActions.sqf and the changes will work in our server!

6. Now open the "fn_SelfActions" in the mission.pbo and find
Code:
//Sleep
if(cursorTarget isKindOf "TentStorage" and _canDo and _ownerID == dayz_characterID) then {
if ((s_player_sleep < 0) and (player distance cursorTarget < 3)) then {
s_player_sleep = player addAction [localize "str_actions_self_sleep", "\z\addons\dayz_code\actions\player_sleep.sqf",cursorTarget, 0, false, true, "",""];
};
} else {
player removeAction s_player_sleep;
s_player_sleep = -1;
};

And right underneath it, we add

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 {
 
//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, "ss_remove.sqf",[_vehicle,_part,_x], 0, false, true, "",""];
s_player_removeActions set [count s_player_removeActions,_handle];
};
};
 
} forEach _hitpoints;
};
};

This gives us the options on the scroll wheel menu when looking at vehicles!

7. Now find

Code:
 //Engineering
{dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
dayz_myCursorTarget = objNull;
//Others
player removeAction s_player_forceSave;
s_player_forceSave = -1;
player removeAction s_player_flipveh;
s_player_flipveh = -1;
player removeAction s_player_sleep;
s_player_sleep = -1;
player removeAction s_player_deleteBuild;
s_player_deleteBuild = -1;
player removeAction s_player_butcher;
s_player_butcher = -1;
player removeAction s_player_cook;
s_player_cook = -1;
player removeAction s_player_boil;
s_player_boil = -1;
player removeAction s_player_fireout;
s_player_fireout = -1;
player removeAction s_player_packtent;
s_player_packtent = -1;
player removeAction s_player_fillfuel;
s_player_fillfuel = -1;
player removeAction s_player_studybody;
s_player_studybody = -1;
//Dog
player removeAction s_player_tamedog;
s_player_tamedog = -1;
player removeAction s_player_feeddog;
s_player_feeddog = -1;
player removeAction s_player_waterdog;
s_player_waterdog = -1;
player removeAction s_player_staydog;
s_player_staydog = -1;
player removeAction s_player_trackdog;
s_player_trackdog = -1;
player removeAction s_player_barkdog;
s_player_barkdog = -1;
player removeAction s_player_warndog;
s_player_warndog = -1;
player removeAction s_player_followdog;
s_player_followdog = -1;
};

And right above it add
Code:
//Extras
//Remove Parts
{silver_myCursorTarget removeAction _x} forEach s_player_removeActions;s_player_removeActions = [];
silver_myCursorTarget = objNull;

This makes sure we don't have the option unless we are looking at vehicles!

8. Last but CERTAINLY not least, download the attached ss_remove.sqf and place it into your mission!

Job done!!!

Sorry but i dont really understand step to what do i do with my Dayz_code?
 
Sorry but i dont really understand step to what do i do with my Dayz_code?
you have to unpack your current dayz_code and put the compiles.sqf as well as the selfactions.sqf to your missionfile.
now you have to change the paths for this files in your mission\init.sqf !
This will let you overwrite the clients dayz_code on connecting with the files now located in your mission.
I have also uploaded a prepaired and working mission a bit earlier in this thread!
Greez
 
Bummer....I see that no one has figured this out for Tavi 2.0 :( Ive taken a small break from it but gonna keep trying.

should be no problem....upload your mission and i will have a look at it! Dont think that there are much differences to chernarus mission...
 
Sorry but i dont really understand step to what do i do with my Dayz_code?
here how it look like if you have it right for chernarus
ih6ufn.jpg
 
Ok I find this thread to be really awesome, and the guide looks pretty easy to follow.
There is one thing however that I don't understand, where do I find the dayz_code?

I've been looking in my dayz_server.pbo and dayz_mission.pbo but I can't find any file named dayz_code.pbo. And I've been looking after that file on the FTP site too, but I can't find it.

would be awesome if somone could make a step by step guide with the file locations too.
 
Back
Top