mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
fixes to repairing
This commit is contained in:
@@ -61,22 +61,27 @@ if (_section and _hasToolbox) then {
|
|||||||
//dont waste loot on undamaged parts
|
//dont waste loot on undamaged parts
|
||||||
if (_damage > 0) then {
|
if (_damage > 0) then {
|
||||||
|
|
||||||
player removeMagazine _part;
|
// ensure part was removed
|
||||||
|
_num_removed = ([player,_part] call BIS_fnc_invRemove);
|
||||||
|
|
||||||
//Fix the part
|
if(_num_removed == 1) then {
|
||||||
_selection = getText(configFile >> "cfgVehicles" >> _type >> "HitPoints" >> _hitpoint >> "name");
|
|
||||||
|
//Fix the part
|
||||||
|
_selection = getText(configFile >> "cfgVehicles" >> _type >> "HitPoints" >> _hitpoint >> "name");
|
||||||
|
|
||||||
//vehicle is owned by whoever is in it, so we have to have each client try and fix it
|
//vehicle is owned by whoever is in it, so we have to have each client try and fix it
|
||||||
dayzSetFix = [_vehicle,_selection,0];
|
dayzSetFix = [_vehicle,_selection,0];
|
||||||
publicVariable "dayzSetFix";
|
publicVariable "dayzSetFix";
|
||||||
if (local _vehicle) then {
|
if (local _vehicle) then {
|
||||||
dayzSetFix call object_setFixServer;
|
dayzSetFix call object_setFixServer;
|
||||||
|
};
|
||||||
|
|
||||||
|
_vehicle setvelocity [0,0,1];
|
||||||
|
|
||||||
|
//Success!
|
||||||
|
cutText [format["You have successfully attached %1 to the %2",_namePart,_nameType], "PLAIN DOWN"];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_vehicle setvelocity [0,0,1];
|
|
||||||
|
|
||||||
//Success!
|
|
||||||
cutText [format["You have successfully attached %1 to the %2",_namePart,_nameType], "PLAIN DOWN"];
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user