[Working] Repair and Refueling Stations

Gorsy

Valued Member!
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!
 
Back
Top