Persei Posted May 8, 2015 Report Share Posted May 8, 2015 tell me how to fix repair 8 wheels instead of 4-6. Link to comment Share on other sites More sharing options...
0 Antichrist Posted May 8, 2015 Report Share Posted May 8, 2015 You only need to fix 4 main wheels, LF2, RF2, LB2 and RB2 wheels are completely useless and can be used to repair your actual wheels Link to comment Share on other sites More sharing options...
0 Persei Posted May 9, 2015 Author Report Share Posted May 9, 2015 How to implement danoe reshenie.Server OwerPoch 1.0.5.1+0.2.5. contents repair_vehicle.sqf private ["_part","_cancel","_color","_allFixed","_percent","_string","_handle","_damage","_cmpt","_vehicle","_hitpoints"]; _vehicle = _this select 3; {dayz_myCursorTarget removeAction _x} count 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 _percent = round(_damage*100); _string = format["<t %2>Repair%1 (%3 %4)</t>",_cmpt,_color,_percent,"%"]; //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]; }; } count _hitpoints; if (_allFixed) then { _vehicle setDamage 0; }; if(count _hitpoints > 0 ) then { _cancel = dayz_myCursorTarget addAction [localize "STR_EPOCH_PLAYER_CANCEL", "\z\addons\dayz_code\actions\repair_cancel.sqf","repair", 0, true, false, "",""]; s_player_repairActions set [count s_player_repairActions,_cancel]; s_player_repair_crtl = 1; }; Link to comment Share on other sites More sharing options...
0 Persei Posted May 11, 2015 Author Report Share Posted May 11, 2015 private ["_part","_cancel","_color","_allFixed","_percent","_string","_handle","_damage","_cmpt","_vehicle","_hitpoints"]; _vehicle = _this select 3; {dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = []; // dayz_myCursorTarget = _vehicle; if (((typeof _vehicle) isKindOf "Car") and !((typeof _vehicle) isKindOf "Truck")) then { _hitpoints = ["HitGlass1","HitGlass2","HitGlass3","HitGlass4","HitLFWheel","HitLBWheel","HitRFWheel","HitRBWheel","HitBody","HitFuel","HitEngine"]; }; if (((typeof _vehicle) isKindOf "Motorcycle")) then { _hitpoints = ["HitGlass1","HitGlass2","HitFWheel","HitBWheel","HitBody","HitFuel","HitEngine"]; }; if ((typeof _vehicle) isKindOf "Truck") then { _hitpoints = ["HitGlass1","HitGlass2","HitGlass3","HitGlass4","HitLFWheel","HitLBWheel","HitRFWheel","HitRBWheel","HitLMWheel","HitRMWheel","HitBody","HitFuel","HitEngine"]; }; if ((typeof _vehicle) isKindOf "Helicopter") then { _hitpoints = ["HitRGlass","HitLGlass","HitGlass1","HitGlass2","HitGlass3","HitGlass4","HitGlass5","HitGlass6","HitHull","HitMissiles","HitAvionics","HitHRotor","PartVRotor","HitEngine"]; }; if ((typeof _vehicle) isKindOf "Plane") then { _hitpoints = ["HitHull"]; }; //_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(["Body",_x,false] call fnc_inString) then { _part = "PartGeneric"; }; if(["Hull",_x,false] call fnc_inString) then { _part = "PartGeneric"; }; if(["Missiles",_x,false] call fnc_inString) then { _part = "PartGeneric"; }; if(["VRotor",_x,false] call fnc_inString) then { _part = "PartGeneric"; }; 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 _percent = round(_damage*100); _string = format["<t %2>Repair%1 (%3 %4)</t>",_cmpt,_color,_percent,"%"]; //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]; }; } count _hitpoints; //if (_allFixed) then { //_vehicle setDamage 0; //}; if(count _hitpoints > 0 ) then { _cancel = dayz_myCursorTarget addAction [localize "STR_EPOCH_PLAYER_CANCEL", "\z\addons\dayz_code\actions\repair_cancel.sqf","repair", 0, true, false, "",""]; s_player_repairActions set [count s_player_repairActions,_cancel]; s_player_repair_crtl = 1; }; Little poked corrected but not all tell me where the error. Link to comment Share on other sites More sharing options...
0 SchwEde Posted May 11, 2015 Report Share Posted May 11, 2015 well you should at least give the source from where you got that ;P HitBody << Right and not HitHull << Wrong Link to comment Share on other sites More sharing options...
0 Persei Posted May 12, 2015 Author Report Share Posted May 12, 2015 "HitHull" Without this option was not a body.And the parameters are stored in dayz_code/config.bin class RepairParts : AllVehicles { class HitEngine { part = "PartEngine"; }; class HitRGlass { part = "PartGlass"; }; class HitLGlass { part = "PartGlass"; }; class HitBody { part = "PartGeneric"; }; class HitFuel { part = "PartFueltank"; }; class HitLFWheel { part = "PartWheel"; }; class HitRFWheel { part = "PartWheel"; }; class HitLF2Wheel { part = "PartWheel"; }; class HitRF2Wheel { part = "PartWheel"; }; class HitLMWheel { part = "PartWheel"; }; class HitRMWheel { part = "PartWheel"; }; class HitLBWheel { part = "PartWheel"; }; class HitRBWheel { part = "PartWheel"; }; class HitFWheel { part = "PartWheel"; }; class HitBWheel { part = "PartWheel"; }; class wheel_1_damper { part = "PartWheel"; }; class wheel_2_damper { part = "PartWheel"; }; class HitGlass1 { part = "PartGlass"; }; class HitGlass2 { part = "PartGlass"; }; class HitGlass3 { part = "PartGlass"; }; class HitGlass4 { part = "PartGlass"; }; class HitGlass5 { part = "PartGlass"; }; class HitGlass6 { part = "PartGlass"; }; class HitVRotor { part = "PartGeneric"; }; class HitHRotor { part = "PartVRotor"; }; class HitAvionics { part = "PartGeneric"; }; class HitMissiles { part = "PartGeneric"; }; class HitHull { part = "PartGeneric"; }; }; corrected code private ["_part","_cancel","_color","_allFixed","_percent","_string","_handle","_damage","_cmpt","_vehicle","_hitpoints"]; _vehicle = _this select 3; {dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = []; // dayz_myCursorTarget = _vehicle; if (((typeof _vehicle) isKindOf "Car") and !((typeof _vehicle) isKindOf "Truck")) then { _hitpoints = ["HitGlass1","HitGlass2","HitGlass3","HitGlass4","HitLFWheel","HitLBWheel","HitRFWheel","HitRBWheel","HitBody","HitFuel","HitEngine"]; }; if ((typeof _vehicle) isKindOf "Truck") then { _hitpoints = ["HitGlass1","HitGlass2","HitGlass3","HitGlass4","HitLFWheel","HitLBWheel","HitRFWheel","HitRBWheel","HitLMWheel","HitRMWheel","HitBoby","HitFuel","HitEngine"]; }; if ((typeof _vehicle) isKindOf "Motorcycle") then { _hitpoints = ["HitGlass1","HitGlass2","HitFWheel","HitBWheel","HitBody","HitFuel","HitEngine"]; }; if ((typeof _vehicle) isKindOf "Bike") then { _hitpoints = ["HitLFWheel","HitLBWheel"] }; if (((typeof _vehicle) isKindOf "ATV_US_EP1") or ((typeof _vehicle) isKindOf "ATV_CZ_EP1")) then { _hitpoints = ["HitLFWheel","HitLBWheel","HitRFWheel","HitRBWheel","HitBody","HitFuel","HitEngine"] }; if ((typeof _vehicle) isKindOf "Helicopter") then { _hitpoints = ["HitGlass1","HitGlass2","HitGlass3","HitGlass4","HitGlass5","HitGlass6","HitHull","HitVRotor","HitHRotor","HitAvionics","HitMissiles","HitEngine"]; }; if ((typeof _vehicle) isKindOf "Plane") then { _hitpoints = ["HitHull"]; }; //_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(["Hull",_x,false] call fnc_inString) then { _part = "PartGeneric"; }; if(["Body",_x,false] call fnc_inString) then { _part = "PartGeneric"; }; 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 _percent = round(_damage*100); _string = format["Repair%1 (%3 %4)",_cmpt,_color,_percent,"%"]; //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]; }; } count _hitpoints; if (_allFixed) then { _vehicle setDamage 0; }; if(count _hitpoints > 0 ) then { _cancel = dayz_myCursorTarget addAction [localize "STR_EPOCH_PLAYER_CANCEL", "\z\addons\dayz_code\actions\repair_cancel.sqf","repair", 0, true, false, "",""]; s_player_repairActions set [count s_player_repairActions,_cancel]; s_player_repair_crtl = 1; }; Link to comment Share on other sites More sharing options...
0 Halvhjearne Posted May 12, 2015 Report Share Posted May 12, 2015 so basicly you stole a script from some servers mission pbo and now you are trying to get help to make it work? goodluck with that ... Link to comment Share on other sites More sharing options...
0 SchwEde Posted May 12, 2015 Report Share Posted May 12, 2015 I know that I put a fix for salvaging 8 wheels from cars here somewhere and this just looks like my work just on repair vehicles. Shouldn't be hard to get this right though just try your skills :) Link to comment Share on other sites More sharing options...
0 Buck0 Posted May 12, 2015 Report Share Posted May 12, 2015 Dem sneaky pbo theif's Link to comment Share on other sites More sharing options...
0 Persei Posted May 12, 2015 Author Report Share Posted May 12, 2015 The fact is that I am on the server was 8 wheels and I decided it ispravit.No fully working since I did not fix nashol I had to collect all that is here in the forum . Maybe someone else has a right solution to this problem , I would be very grateful. Link to comment Share on other sites More sharing options...
Question
Persei
tell me how to fix repair 8 wheels instead of 4-6.
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now