ACE3/addons/gunbag/functions/fnc_toGunbag.sqf
2016-06-12 13:51:23 +02:00

32 lines
617 B
Plaintext

/*
* 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"];
private _gunbag = backpackContainer _target;
_unit call EFUNC(common,goKneeling);
// play sound
if (!isNil "ACE_Backpacks") then {
[_target, _gunbag] call EFUNC(backpacks,backpackOpened);
};
[PROGRESSBAR_TIME, _this, {
(_this select 0) call FUNC(toGunbagCallback)
}, {}, localize LSTRING(toGunbag), {
(_this select 0) call FUNC(canInteract) == 0
}] call EFUNC(common,progressBar);