Remove Parts From Vehicles (Simplified)

mine is duplicating items and not showing the empty tire in the car , like it was never taken from it

1.7.7.1 , im working on it
 
that fix the #0 kick

publicvariable.txt

in battleye folder

Code:
1 !="remExField" !="remExFP" !="drn_AskServerDynamicWeatherEventArgs" !="BIS_effects_gepv" !"PVDZ_"
1 PVDZ_ !=PVDZ_drg_RaDrag !=PVDZ_drg_RaLW !=PVDZ_drg_RLact !=PVDZ_hlt_Bandage !=PVDZ_hlt_Bleed !=PVDZ_hlt_Epi !=PVDZ_hlt_Morphine !=PVDZ_hlt_PainK !=PVDZ_hlt_Transfuse !=PVDZ_obj_Delete !=PVDZ_obj_Fire !=PVDZ_obj_GutBody !=PVDZ_obj_HideBody !=PVDZ_obj_Publish !=PVDZ_obj_RoadFlare !=PVDZ_plr_Death !=PVDZ_plr_Discorem !=PVDZ_plr_Humanity !=PVDZ_plr_Login1 !=PVDZ_plr_Login2 !=PVDZ_plr_LoginRecord !=PVDZ_plr_Save !=PVDZ_sec_atp !=PVDZ_veh_Save !=PVDZ_veh_SetFuel !=PVDZ_veh_SF !=PVDZ_veh_SH
 
////////////////////////// From server only: Broadcast PV without EH (no code executed on change)
1="drn_var_DynamicWeather_rain"
1="drn_var_DynamicWeather_ServerInitialized"
 
////////////////////////// Broadcast PV with EH
//1="PVDZ_obj_Fire"
1="PVDZ_obj_GutBody"
1="PVDZ_obj_HideBody"
1="PVDZ_plr_Humanity"
//1="PVDZ_obj_RoadFlare"
//1="drn_AskServerDynamicWeatherEventArgs"
//1="PVDZ_drg_RaDrag"
//1="PVDZ_drg_RaLW"
//1="PVDZ_drg_RLact"
//1="PVDZ_hlt_Bandage"
//1="PVDZ_hlt_Bleed"
//1="PVDZ_hlt_Epi"
//1="PVDZ_hlt_Morphine"
//1="PVDZ_hlt_PainK"
//1="PVDZ_hlt_Transfuse"
1="BIS_effects_gepv"
1="PVDZ_veh_SetFuel"
1="PVDZ_veh_SH"
1="PVDZ_veh_SF"
1=PVDZ_plr_Discorem  // crap
 
////////////////////////// From server only: Broadcast PV with EH
5="dayzInfectedCamps"
5="dayzSetDate"
5="drn_DynamicWeather_DebugTextEventArgs"
5="drn_DynamicWeatherEventArgs"
 
 
////////////////////////// Unicast PV ->Server
//1="PVDZ_sec_atp"
//1="PVDZ_plr_Save"
//1="PVDZ_veh_Save"
1="PVDZ_obj_Delete"
1="PVDZ_plr_Death"
1="PVDZ_plr_LoginRecord"
1="PVDZ_obj_Publish"
//1="PVDZ_plr_Login1"
//1="PVDZ_plr_Login2"
 
////////////////////////// Unicast PV Client<-
5="dayzPlayerLogin2"
5="dayzPlayerLogin"
 
////////////////////////// BIS libs
//1="remExField"
//1="remExFP"
 
The part being removed did not get removed from the vehicle. But I did the 1.7.7 fix by NeverUsedID on page 5 and it fixed the problem in 1.7.7.1

Thanks.
 
My main issue with this plugin is that it doesn't show the list of a repaired vehicle.
You can add parts to a vehicle that is damaged, but you can't remove any from a vehicle that has spare parts.
It simply doesn't show me the list (the blue "remove" list)

Suggestions?
 
I am getting kicked by BE everytime I try to remove a part from the vehicle. This is what is showing in the log file:

Code:
05.07.2013 18:07:29: j0sty (xxx.xxx.xxx.xxx)  - #1 "hitpoint == "HitEngine" or _hitpoint == "HitFuel" ) then {
dayzSetFix = [_vehicle,_selection,0.89];
} else {
dayzSetFix = [_vehi"

I am not 100% sure how to write exceptions in scripts.txt. The host that my server is through had a pretty empty scripts.txt file so I couldn't find "dayzSetFix." Not even sure if that is where I write the exception. Any help would be appreciated, I am pretty new to this but know my way around the files to make the needed tweaks/changes. Thanks!
 
The ones that are still having problems

1) start fresh
2) ss_remove.sqf
Code:
// Remove Parts from Vehicles - By SilverShot.
// added anti dupingcode, dayz 1.7.7 compatibility and some description by NeverUsedID - www.die-philosoffen.com
 
private["_vehicle","_part","_hitpoint","_type","_selection","_array"];
_id = _this select 2;
_array =    _this select 3;
_vehicle =    _array select 0;
_part =        _array select 1;
_hitpoint = _array select 2;
_type = typeOf _vehicle;
 
 
_hasToolbox =    "ItemToolbox" in items player;
 
_nameType =        getText(configFile >> "cfgVehicles" >> _type >> "displayName");
_namePart =        getText(configFile >> "cfgMagazines" >> _part >> "displayName");
 
if (_hasToolbox) then {
    if (getDammage _vehicle < 2) then {
 
        _damage = [_vehicle,_hitpoint] call object_getHit;
        //check if part is not damaged and remove it
        if( _damage < 0.20 ) then {
                {silver_myCursorTarget removeAction _x} forEach s_player_removeActions;
                s_player_removeActions = [];
                silver_myCursorTarget = objNull;
 
                _selection = getText(configFile >> "cfgVehicles" >> _type >> "HitPoints" >> _hitpoint >> "name");
                //check if part is engine or fueltank, otherwise vehicle will explode if damage is set to 1.
                if( _hitpoint == "HitEngine" or _hitpoint == "HitFuel" ) then {
                    _total = [_vehicle,  _selection, 0.89,  _array, "zombie", true] call fnc_veh_handleDam;
                } else {
                    // set damage to 1
                    _total = [_vehicle,  _selection, 1,  _array, "zombie", true] call fnc_veh_handleDam;
                };
                //play animation
                player playActionNow "Medic";
                sleep 1;
 
                [player,"repair",0,false] call dayz_zombieSpeak;
                null = [player,10,true,(getPosATL player)] spawn player_alertZombies;
                sleep 5;
                _vehicle setvelocity [0,0,1];
   
            //recheck damage to be sure that part is removed from vehicle
                _damage = [_vehicle,_hitpoint] call object_getHit;
                if( _damage > 0.20 ) then {
                        _result = [player,_part] call BIS_fnc_invAdd;
                        //check if there is enough space in inventar
                        if (_result) then {
                            cutText [format["You have successfully taken %1 from the %2",_namePart,_nameType], "PLAIN DOWN"];
                        } else {
                            //if not enought space say "not enough space"
                            cutText [localize "str_player_24", "PLAIN DOWN"];
                            //and add the part back to the vehicle.
                            [_vehicle, _selection, 0, true] call fnc_veh_handleRepair;
                        };               
                };
            } else {
            cutText [format["Cannot remove %1 from %2, the part has been damaged.",_namePart,_nameType], "PLAIN DOWN"];
        };
    } else {
        {silver_myCursorTarget removeAction _x} forEach s_player_removeActions;
        s_player_removeActions = [];
        silver_myCursorTarget = objNull;
    };
};
 
if( silver_myCursorTarget != objNull ) then {
    {silver_myCursorTarget removeAction _x} forEach s_player_removeActions;
    s_player_removeActions = [];
    silver_myCursorTarget = objNull;
};
//update vehicle in database
[_vehicle,_type] spawn server_updateObject;

for 1.7.7.1 , thats the only thing you have to change from the original tutorial

and for the BE kick

go to your Battleye folder inside your server config then go to
publicvariable.txt edit it with notepad ++ (recommended)
Code:
1 !="remExField" !="remExFP" !="drn_AskServerDynamicWeatherEventArgs" !="BIS_effects_gepv" !"PVDZ_"
1 PVDZ_ !=PVDZ_drg_RaDrag !=PVDZ_drg_RaLW !=PVDZ_drg_RLact !=PVDZ_hlt_Bandage !=PVDZ_hlt_Bleed !=PVDZ_hlt_Epi !=PVDZ_hlt_Morphine !=PVDZ_hlt_PainK !=PVDZ_hlt_Transfuse !=PVDZ_obj_Delete !=PVDZ_obj_Fire !=PVDZ_obj_GutBody !=PVDZ_obj_HideBody !=PVDZ_obj_Publish !=PVDZ_obj_RoadFlare !=PVDZ_plr_Death !=PVDZ_plr_Discorem !=PVDZ_plr_Humanity !=PVDZ_plr_Login1 !=PVDZ_plr_Login2 !=PVDZ_plr_LoginRecord !=PVDZ_plr_Save !=PVDZ_sec_atp !=PVDZ_veh_Save !=PVDZ_veh_SetFuel !=PVDZ_veh_SF !=PVDZ_veh_SH
 
////////////////////////// From server only: Broadcast PV without EH (no code executed on change)
1="drn_var_DynamicWeather_rain"  
1="drn_var_DynamicWeather_ServerInitialized"  
 
////////////////////////// Broadcast PV with EH
//1="PVDZ_obj_Fire"
1="PVDZ_obj_GutBody"
1="PVDZ_obj_HideBody"
1="PVDZ_plr_Humanity"
//1="PVDZ_obj_RoadFlare"
//1="drn_AskServerDynamicWeatherEventArgs"
//1="PVDZ_drg_RaDrag"
//1="PVDZ_drg_RaLW"
//1="PVDZ_drg_RLact"
//1="PVDZ_hlt_Bandage"
//1="PVDZ_hlt_Bleed"
//1="PVDZ_hlt_Epi"
//1="PVDZ_hlt_Morphine"
//1="PVDZ_hlt_PainK"
//1="PVDZ_hlt_Transfuse"
1="BIS_effects_gepv"
1="PVDZ_veh_SetFuel"
1="PVDZ_veh_SH"
1="PVDZ_veh_SF"
1=PVDZ_plr_Discorem  // crap
 
////////////////////////// From server only: Broadcast PV with EH
5="dayzInfectedCamps"
5="dayzSetDate"
5="drn_DynamicWeather_DebugTextEventArgs"
5="drn_DynamicWeatherEventArgs"
 
 
////////////////////////// Unicast PV ->Server
//1="PVDZ_sec_atp"
//1="PVDZ_plr_Save"
//1="PVDZ_veh_Save"
1="PVDZ_obj_Delete"
1="PVDZ_plr_Death"
1="PVDZ_plr_LoginRecord"
1="PVDZ_obj_Publish"
//1="PVDZ_plr_Login1"
//1="PVDZ_plr_Login2"
 
////////////////////////// Unicast PV Client<-
5="dayzPlayerLogin2"
5="dayzPlayerLogin"
 
////////////////////////// BIS libs
//1="remExField"
//1="remExFP"
[/CODE
 
For me, it only works on wheels. If I remove the engine or rotors on helicopters it'll be red but they'll run prefectly fine. Is there something i can do?
 
Is there a way to change the amount of bag space a vehicle part may take up? I have seen on some servers that a tire will only take up 1 spot, etc. Thanks!
 
Works 100% on 1.7.7.1
When he says start over....START OVER..trust me I didnt want to start over...but I did and guess what...IT WORKED LOL
Thanks!
 
Works great here too. Just have to figure out why you can remove fuel/engine/rotor parts and still have a vehicle that drives lol.

//check if part is engine or fueltank, otherwise vehicle will explode if damage is set to 1.

makes sense... just trying to think of a creative way around that... or maybe just remove both as most people are just wanting wheels anyways
 
Hey guys... if anyone is watching...

I was informed by some players last night that it's easy to exploit this. A guy said he could keep clicking Remove Clothes really quickly and get many clothing! He also said something about being able to get gear off the body multiple times but I have not tested it myself.

Sounds like there needs to be some sort of sleep period or something to prevent this... has anyone fixed this already? I'd like to use this mod but probably wont have time for a bit to fix it to prevent exploiting.

I'm sure that they would be more than happy to help you, but it seems you are posting regarding a different script. This is remove parts, not remove clothing...
 
you can remake it under the 1.8 version? trying to remove the spare part and writes that there is no place, although the place is
 
Okay: First solution:

remove the "remove vehicle parts" code from fn_selfactions.
find the two commented salvagefunctions from dayz1.8 one start with "menu1=" and enable it:

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", "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;
        };
    };

copy the salvage_vehicle.sqf from dayz_code to your mission file and change the path in fn_selfaction to the new one.

edit salvage_vehicle.sqf and replace salvage.sqf path with the ss_remove.sqf:

Code:
_handle = dayz_myCursorTarget addAction [_string, "custom\ss_remove.sqf",[_vehicle,_part,_x], 0, false, true, "",""];

Dayz developers tried to build remove parts in for themself, but they are stucked at the moment where the item isnt removed from the vehicle but added to your inf.
 
NeverUsedID
there is a bug in this version. shows the removal of the machine which should not be in the car (5 and 6 wheel truck "wheel_2_3_steering" and "wheel_2_4_steering" and also the name of two different glasses "sklo predni P" and "glass1")
 
Back
Top