ADD FIX, REFUEL and REARM ACTION SCRIPT© norrin, MAY 2009 (updated 080509)
Thanks to both Mandoble and Spooner for their advice and suggestions
Description:Gives the driver of a vehicle the option to fix, refuel and re-arm adjacent vehicles. When an action is initiated a timer appears. Current timings are 30 secs repair, 15 seconds for both re-arm and refuel. If the driver leaves the vehicle or changes to another vehicle position the action is cancelled. Only one action can be performed at a time.
This is another script that was suggested by one of my clan members (thanks soldierX). No doubt someone has something similar already built into their own missions but once again I checked the ArmAholic and OFP script databases and couldn't see anything similar so I ended up writing my own.
To implement:1. Copy the Norrn_SF_supportVcl folder to your mission directory
2. To the vehicle you would like to add the ability to fix, refuel and rearm other vehicles put this in their init line in the editor:
nul = [this] execVM "Norrn_SF_supportVcl\init_repairer.sqf"
3. To all friendly vehicles add this in their init line in the editor:
this setVariable ["Norrn_vcl_mags", (magazines this)];
4. If you wish to use a hint rather than titlecut for script messages you can define the message type used in the scripts by modifying line 15 of the add_actions.sqf in the script folder :
// Define hint type for NORRN ADD FIX, REFUEL & REARM ACTION SCRIPT
NORRN_supportVcl_hint = 0; // 0 - hint, 1 - titleCut (default 1)
Added 070509
Other notes:* Players must enter the vehicle as the driver to get the fix, refuel and rearm options, if they move to another postion within the vehicle the options will disappear and the current action will be cancelled. If they then return to the drivers seat the options will reappear.
* The vehicle to be repaired, rearmed or refuelled must be the closest vehicle to the support vehicle.
* Only one action can be taken at a time.
* The vehicle must be stationary and the engine off for the options to appear.
* If the vehicle being repaired, rearmed or refuelled moves more than 15 metres away the action is cancelled.
OFPEC DOWNLOAD