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.
countFuel = (count ((position _currentVehicle) nearObjects ["[COLOR=#339966]land_nav_pier_c_big[/COLOR]","Land_Barn_Metal", _distance]));
_countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["[COLOR=#339966]land_nav_pier_c_big[/COLOR]","Land_Barn_Metal", _distance]));
etc
etc
I'll have it attach all the parts in the coding for the next update release where i also plan to set the damage of the vehicle to nearly destroyed before doing the repair script to stablize the time players have to wait
Ok guys after having alot of issues with the other repair station script on here, I decided to go about it in a different approach
Credit where its due to Seven, and Muddr. For their original refueling script
and thanks to Zombz.net, Player2, Ghost
What this script does is, lets you choose the building types to turn into a repair station, define the range you need to be within, to use it and also gives you the option via mousewheel.
Installation Details
Step 1
Open your Init.sqf located in your mission.pbo
add the following line... to the isdedicated section
[] execVM "Scripts\repairactions.sqf";
Step 2
Create a folder called Scripts if you dont already have one
Visit the links below and paste the code into two new files and save them in the scripts folder
repair.sqf
repairactions.sqf
Thats it, Pretty simple.
See below to set this up once you have it installed. You WILL need to find out the building names (editor does help with this, or your database if you have added buildings that way)
This link helps with building names too
-----------------------------------------------------------------------------------------------------------------
Changing Settings
Choose your building type to be the repair station
Open your repairactions.sqf
Find the lines below and change the green text to the building names (line 17 to 22)
countFuel = (count ((position _currentVehicle) nearObjects ["land_nav_pier_c_big", _distance]));
_countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["land_nav_pier_c_big", _distance]));
_countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["land_nav_pier_c_big", _distance]));
_countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["land_nav_pier_c_big", _distance]));
_countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["land_nav_pier_c_big", _distance]));
_countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["land_nav_pier_c_big", _distance]));
Note: You can have more than the one type if you want to vary it, Im using a pier only that I have on custom bases. To have multiple buildings, just simply change some of the others shown above
Changing the time need to refuel/repair and the distance
Open your repairactions.sqf
Simply adjust the timers below shown in green (lines 9 to 11)
_distance = 50; // Distance from object to display Refuel Message
_amount= 0.02; // Refuel rate
_amount2= 0.01; // Repair Rate
Changing the custom messages
Open your repairs.sqf located in the scripts folder
Edit the green text shown in the lines below (lines 16,26,29)
titleText ["Refueling and Repairing", "PLAIN DOWN", 3];
titleText ["Refueling and Repairs Finished", "PLAIN DOWN", 3];
titleText ["Refueling and Repairs Stopped", "PLAIN DOWN", 3];
Enjoy!
1. A column called "damage".
Here we have a value ranging from 0.00000 to 1.00000, which means no damage at all to completely wrecked.
2. A column called "Hitpoints"
Here we have an entry for each single damaged part, which, for example, looks like that:
[["wheel_1_1_steering",0.809],["wheel_1_2_steering",1],["wheel_2_1_steering",1],["wheel_2_2_steering",0.926],["motor",1],["sklo predni P",1],["sklo predni L",0.669],["karoserie",1],["palivo",1],["wheel_1_4_steering",1],["wheel_2_4_steering",1],["wheel_1_3_steering",1],["wheel_2_3_steering",1],["glass1",0.721],["glass2",0.347],["glass3",0.958],["glass4",0.541]]
There seem to be the following parts:
8 wheels
=======
["wheel_1_1_steering",0.0],
["wheel_1_2_steering",0.0],
["wheel_1_3_steering",0.0],
["wheel_1_4_steering",0.0],
["wheel_2_1_steering",0.0],
["wheel_2_2_steering",0.0],
["wheel_2_3_steering",0.0],
["wheel_2_4_steering",0.0],
Up to 8 glasses
============
["glass1",0.0],
["glass2",0.0],
["glass3",0.0],
["glass4",0.0],
["glass5",0.0],
["glass6",0.0],
["sklo predni P",0.0], Front glass right
["sklo predni L",0.0], Front glass left
11 possible other parts
===================
["motor",0.0], Engine (all vehicles)
["karoserie",0.0], Hull (wheeled vehicles)
["palivo",0.0], Fueltank (wheeled vehicles)
["NEmotor",0.0], Engine (some wheeled military vehicles... ?)
["NEpalivo",0.0], Fueltank (some wheeled military vehicles... ?)
["NEtrup",0.0], Hull (Helis)
["elektronika",0.0], Avionics (Helis)
["mala vrtule",0.0], Back Rotor (Helis)
["velka vrtule",0.0], Main Rotor (Helis)
["munice",0.0], Missiles (Helis)
["telo",0.0], Hull (airplanes)
With nothing damaged the field can be empty as well... []
(The parts listed above refer to DayZ Epoch, other mods may have additional parts, for instance there were no tracked vehicles for me to look at...)
if (!isNull player) then {
private ["_currentVehicle", "_isNearFeed", "_countFuel"];
_currentVehicle = vehicle player;
_countFuel = (count ((position _currentVehicle) nearObjects ["Land_Mil_Barracks_i", _distance]));
_countFuel = _countFuel + (count ((position _currentVehicle) nearObjects ["Land_Mil_Barracks_i", _distance]));
_isNearFeed = _countFuel > 0;