fnc_refuelUAVDrone.sqf 745 B

123456789101112131415161718
  1. params["_target", "_player", "_params"];
  2. if (!(_this call rd501_fnc_canRefuel)) exitWith {};
  3. private _onFinish = {
  4. (_this select 0) params ["_target", "_player"];
  5. _player removeItem "ACE_UAVBattery";
  6. ["ace_common_setFuel", [_target, 1], [_target]] call CBA_fnc_targetEvent;
  7. [format["Refuelled %1", _target], true, 2, 0] call ace_common_fnc_displayText;
  8. };
  9. private _onFailure = {
  10. (_this select 0) params ["_target", "_player"];
  11. [_player, "AmovPknlMstpSrasWrflDnon", 1] call ace_common_fnc_doAnimation;
  12. };
  13. [_player, "AinvPknlMstpSnonWnonDr_medic5", 0] call ace_common_fnc_doAnimation;
  14. [10, [_target, _player], _onFinish, _onFailure, ("Refueling"), {(_this select 0) call rd501_fnc_canRefuel}] call ace_common_fnc_progressBar;