ACE3/addons/rearm/functions/fnc_rearmEntireVehicle.sqf
Tim Beswick c9f1719f5a Hot Resupply (#5639)
Allow rearm, refuel and pylons to function while vehicle engine is running
2017-10-25 23:13:44 -05:00

34 lines
803 B
Plaintext

/*
* Author: GitHawk
* Starts progress bar for rearming an entire vehicle.
*
* Arguments:
* 0: Ammo Truck <OBJECT>
* 1: Unit <OBJECT>
* 2: Vehicle to be armed <OBJECT>
*
* Return Value:
* None
*
* Example:
* [ammo_truck, player, tank] call ace_rearm_fnc_rearmEntireVehicle
*
* Public: No
*/
#include "script_component.hpp"
params ["_truck", "_player", "_vehicle"];
[
TIME_PROGRESSBAR(10),
[_truck, _player, _vehicle],
FUNC(rearmEntireVehicleSuccess),
"",
format [localize LSTRING(BasicRearmAction), getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")],
{
param [0] params ["", "_player", "_vehicle"];
(_player distanceSqr _vehicle) <= REARM_ACTION_DISTANCE_SQR
},
["isnotinside"]
] call EFUNC(common,progressBar);