2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-08-16 00:18:53 +00:00
|
|
|
/*
|
|
|
|
* Author: GitHawk
|
2015-08-18 00:32:10 +00:00
|
|
|
* Starts progress bar for rearming an entire vehicle.
|
2015-08-16 00:18:53 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2015-08-18 00:32:10 +00:00
|
|
|
* 0: Ammo Truck <OBJECT>
|
|
|
|
* 1: Unit <OBJECT>
|
|
|
|
* 2: Vehicle to be armed <OBJECT>
|
2015-08-16 00:18:53 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [ammo_truck, player, tank] call ace_rearm_fnc_rearmEntireVehicle
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2016-02-27 19:31:07 +00:00
|
|
|
|
2017-10-26 04:13:44 +00:00
|
|
|
params ["_truck", "_player", "_vehicle"];
|
2017-12-30 12:46:11 +00:00
|
|
|
TRACE_3("rearmEntireVehicle",_truck,_player,_vehicle);
|
2015-08-16 00:18:53 +00:00
|
|
|
|
|
|
|
[
|
2017-06-08 16:47:52 +00:00
|
|
|
TIME_PROGRESSBAR(10),
|
2017-12-30 12:46:11 +00:00
|
|
|
[_truck, _vehicle, _player],
|
2018-10-13 17:07:32 +00:00
|
|
|
{(_this select 0) call FUNC(rearmEntireVehicleSuccess)},
|
2015-08-16 00:18:53 +00:00
|
|
|
"",
|
2021-02-18 18:58:08 +00:00
|
|
|
format [localize LSTRING(BasicRearmAction), getText(configOf _vehicle >> "displayName")],
|
2017-10-26 04:13:44 +00:00
|
|
|
{
|
2017-12-30 12:46:11 +00:00
|
|
|
param [0] params ["", "_vehicle", "_player"];
|
2019-09-04 00:06:50 +00:00
|
|
|
_player distance _vehicle <= GVAR(distance);
|
2017-10-26 04:13:44 +00:00
|
|
|
},
|
2015-08-16 00:18:53 +00:00
|
|
|
["isnotinside"]
|
2015-08-18 00:32:10 +00:00
|
|
|
] call EFUNC(common,progressBar);
|