ACE3/addons/spottingscope/functions/fnc_pickup.sqf

31 lines
649 B
Plaintext
Raw Normal View History

2015-06-05 07:34:27 +00:00
/*
* Author: Rocko, Ruthberg
* Pick up spotting scope
*
* Arguments:
* 0: spotting scope <OBJECT>
* 1: unit <OBJECT>
*
* Return value:
* None
2015-08-07 09:47:23 +00:00
*
* Example:
* [spotting_scope, player] call ace_spottingscope_fnc_pickup
*
* Public: No
2015-06-05 07:34:27 +00:00
*/
#include "script_component.hpp"
2015-08-07 09:47:23 +00:00
params ["_spottingScope", "_unit"];
2015-06-05 07:34:27 +00:00
if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then {
2015-06-05 08:32:55 +00:00
_unit playMove "AmovPercMstpSrasWrflDnon_diary";
2015-06-05 07:34:27 +00:00
};
[{
2015-08-07 09:47:23 +00:00
params ["_spottingScope", "_unit"];
2015-06-05 08:32:55 +00:00
[_unit, "ACE_SpottingScope"] call EFUNC(common,addToInventory);
2015-06-05 07:34:27 +00:00
deleteVehicle _spottingScope;
}, [_spottingScope, _unit], 1, 0]call CBA_fnc_waitAndExecute;