2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2016-05-03 08:21:21 +00:00
|
|
|
/*
|
|
|
|
* Author: Ir0n1E
|
2016-06-12 21:56:00 +00:00
|
|
|
* Get weapon out of gunbag.
|
2016-05-03 08:21:21 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
* 1: Target <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
2016-06-12 21:56:00 +00:00
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
2020-04-25 06:41:45 +00:00
|
|
|
* [player, target] call ace_gunbag_fnc_offGunbag
|
2016-05-03 08:21:21 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2016-06-12 11:51:23 +00:00
|
|
|
params ["_unit", "_target"];
|
2016-05-03 08:21:21 +00:00
|
|
|
|
2016-06-12 11:51:23 +00:00
|
|
|
private _gunbag = backpackContainer _target;
|
2016-05-03 08:21:21 +00:00
|
|
|
|
2016-06-12 11:51:23 +00:00
|
|
|
_unit call EFUNC(common,goKneeling);
|
2016-05-04 18:06:56 +00:00
|
|
|
|
2016-05-17 10:19:17 +00:00
|
|
|
// play sound
|
2016-06-13 13:58:42 +00:00
|
|
|
if (["ace_backpacks"] call EFUNC(common,isModLoaded)) then {
|
2016-06-12 11:51:23 +00:00
|
|
|
[_target, _gunbag] call EFUNC(backpacks,backpackOpened);
|
2016-05-04 18:06:56 +00:00
|
|
|
};
|
2016-06-12 11:51:23 +00:00
|
|
|
|
|
|
|
[PROGRESSBAR_TIME, _this, {
|
|
|
|
(_this select 0) call FUNC(offGunbagCallback)
|
|
|
|
}, {}, localize LSTRING(offGunbag), {
|
|
|
|
(_this select 0) call FUNC(canInteract) == 1
|
|
|
|
}] call EFUNC(common,progressBar);
|