Remove Parts From Vehicles (Simplified)

Strange, because the logic that gives you the option is in "fn_selfActions.sqf". ss_remove.sqf is only what to do when remove part is clicked. Do you realy changed the ss_remove.sqf file ?
 
Anyone else having or heard about an issues with cars re spawning back into their original spawn point during restarts?
 
a little issue here, remove menu only appearing for a few seconds and dissapears only giving me the option to repair
 
Have fixed the duping issue by changing the script. Need some more testing.
Code:
// Remove Parts from Vehicles - By SilverShot. Dupingpatch by NeverUsedID
 
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;
 
        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");
                if( _hitpoint == "HitEngine" or _hitpoint == "HitFuel" ) then {
                    dayzSetFix = [_vehicle,_selection,0.89];
                } else {
                    dayzSetFix = [_vehicle,_selection,1];
                };
                publicVariable "dayzSetFix";
                if (local _vehicle) then {
                    dayzSetFix call object_setFixServer;
                };
 
                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];
         
                _damage = [_vehicle,_hitpoint] call object_getHit;
                //Dupingpatch
                if( _damage > 0.20 ) then {
                        _result = [player,_part] call BIS_fnc_invAdd;
                     
                        if (_result) then {
                            cutText [format["You have successfully taken %1 from the %2",_namePart,_nameType], "PLAIN DOWN"];
                        } else {
                            cutText [localize "str_player_24", "PLAIN DOWN"];
                            dayzSetFix = [_vehicle,_selection,0];
                        };
                        publicVariable "dayzSetFix";
                        if (local _vehicle) then {
                            dayzSetFix call object_setFixServer;
                        };
                };
            } 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;
};

Thank you very much sir saved me making the same fix :)
 
Anyone had issues on Namalsk with this?

Works perfectly on my chernarus server, just wont show on namalsk, no errors.
 
Look at the logfile. There you should read why. Most Time its a copy past error where a bracket or something is missing. Once i had the Same prob. I ended to redo all changes and Start over again.
 
Sorted, I didn't have a toolbox.

Yes Really!

That's what I get for doing it so late at night. My co-devs really did laugh!
 
The method before the patch worked but now I've used the patch the ability to remove parts isn't there. I'm not sure where I've gone wrong. Any suggestions? Is there a way I can send you the files so you can have a quick look to see I haven't put a digit in the wrong place lol. Baffled me.
Thanks.

EDIT: I've only made changes to fn_selfActions.sqf, using the patch given, is that correct?
 
that was my problem too, figured it out prior but i am glad i wasn't the only one that wasn't born with the knowledge ;)
 
Hi guys i have a question i hope someone can help with. I'm using this addon on my server and it is all working great except for when i try and strip parts of the chinook i don't get the scroll option until i am lying under it closer to the middle so my question is can someone tell me which part of the code i need to modify to increase the distance away from the vehicle that the scroll option comes up. I have the same problem with my auto refuel but if someone can help me with this 1 i can probably work the other 1 out. Thx
 
Back
Top