Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
In your vehicle table set all vehicles to damage min and max 0. Then delete and respawn all of the vehicles on the map. You can do that by setting damage to 1 on all of them in instance_vehicle table. When you respawn them they will all be fully repaired.
The RealityCP app (if you are running reality) has the option to delete and respawn all the vehicles on the server so you can run that or something similar every restart.
https://github.com/thevisad/DayZ-Private-master/wiki
This will only respawn them fully repaired, correct? If I am understanding Jorgens correctly, he is looking for a way to have all of the vehicles fully repaired after every server restart regardless of whether they are freshly respawned or have been driven 8km across the map and parked at someones base.
if (!(isNil "Dayz_GUI_R") or !(isNil "dayz_originalPlayer")) then {
{
_vehicle = _x;
/*repair*/
_hitpoints = _vehicle call vehicle_getHitpoints;
{_selection = getText (configFile >> "cfgVehicles" >> _type >> "HitPoints" >> _x >> "name");
dayzSetFix = [_vehicle, _selection, 0];
publicVariable "dayzSetFix";
if (local _vehicle) then {dayzSetFix call object_setFixServer;};} forEach _hitpoints;
/*refuel*/
_type = typeOf _vehicle;
_fuel = getNumber (configFile >> "cfgVehicles" >> _type >> "fuelCapacity");
dayzSetFuel = [_vehicle, _fuel];
dayzSetFuel spawn local_sefFuel;
publicVariable "dayzSetFuel";
/*other*/
_vehicle setDamage 0;
_vehicle setVehicleAmmo 1;
_vehicle setFuel 1;
_vehicle setVectorUp [0,0,1];
_vehicle setvelocity [0,0,1];
cutText [format["%1 repaired",_x], "PLAIN DOWN"];
} forEach vehicles;
}else{
{
_vehicle = _x;
_vehicle setDamage 0;
_vehicle setVehicleAmmo 1;
_vehicle setFuel 1;
_vehicle setVectorUp [0,0,1];
_vehicle setvelocity [0,0,1];
cutText [format["%1 repaired",_x], "PLAIN DOWN"];
} forEach vehicles;
};
hint "REPAIRED ALL VEHICLE";
cutText [format["REPAIRED ALL VEHICLE"], "PLAIN DOWN"];
You could assign a script like the one below (not mine btw) to a hotkey accessible by admins only, then whenever you want to repair refuel ALL vehicles, just hit the key and away you go. You'll need to figure out the BE additions and all the other technical stuff, but the script has everything you need...
Code:if (!(isNil "Dayz_GUI_R") or !(isNil "dayz_originalPlayer")) then { { _vehicle = _x; /*repair*/ _hitpoints = _vehicle call vehicle_getHitpoints; {_selection = getText (configFile >> "cfgVehicles" >> _type >> "HitPoints" >> _x >> "name"); dayzSetFix = [_vehicle, _selection, 0]; publicVariable "dayzSetFix"; if (local _vehicle) then {dayzSetFix call object_setFixServer;};} forEach _hitpoints; /*refuel*/ _type = typeOf _vehicle; _fuel = getNumber (configFile >> "cfgVehicles" >> _type >> "fuelCapacity"); dayzSetFuel = [_vehicle, _fuel]; dayzSetFuel spawn local_sefFuel; publicVariable "dayzSetFuel"; /*other*/ _vehicle setDamage 0; _vehicle setVehicleAmmo 1; _vehicle setFuel 1; _vehicle setVectorUp [0,0,1]; _vehicle setvelocity [0,0,1]; cutText [format["%1 repaired",_x], "PLAIN DOWN"]; } forEach vehicles; }else{ { _vehicle = _x; _vehicle setDamage 0; _vehicle setVehicleAmmo 1; _vehicle setFuel 1; _vehicle setVectorUp [0,0,1]; _vehicle setvelocity [0,0,1]; cutText [format["%1 repaired",_x], "PLAIN DOWN"]; } forEach vehicles; }; hint "REPAIRED ALL VEHICLE"; cutText [format["REPAIRED ALL VEHICLE"], "PLAIN DOWN"];