ACE3/addons/gunbag/functions/fnc_offGunbag.sqf
2016-06-13 15:58:42 +02:00

35 lines
709 B
Plaintext

/*
* Author: Ir0n1E
* Get weapon out of gunbag.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Target <OBJECT>
*
* Return Value:
* None
*
* Example:
* [player, target] call ace_gunbag_fnc_toGunbag
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit", "_target"];
private _gunbag = backpackContainer _target;
_unit call EFUNC(common,goKneeling);
// play sound
if (["ace_backpacks"] call EFUNC(common,isModLoaded)) then {
[_target, _gunbag] call EFUNC(backpacks,backpackOpened);
};
[PROGRESSBAR_TIME, _this, {
(_this select 0) call FUNC(offGunbagCallback)
}, {}, localize LSTRING(offGunbag), {
(_this select 0) call FUNC(canInteract) == 1
}] call EFUNC(common,progressBar);