2016-05-03 08:21:21 +00:00
|
|
|
/*
|
|
|
|
* Author: Ir0n1E
|
|
|
|
* put weapon into gunbag
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Unit <OBJECT>
|
|
|
|
* 1: Target <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Nothing
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
params ["_unit", "_target"];
|
|
|
|
|
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:14:57 +00:00
|
|
|
// play sound
|
2016-06-12 11:51:23 +00:00
|
|
|
if (!isNil "ACE_Backpacks") then {
|
|
|
|
[_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(toGunbagCallback)
|
|
|
|
}, {}, localize LSTRING(toGunbag), {
|
|
|
|
(_this select 0) call FUNC(canInteract) == 0
|
|
|
|
}] call EFUNC(common,progressBar);
|