ACE3/addons/tripod/functions/fnc_pickup.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

34 lines
623 B
Plaintext

#include "..\script_component.hpp"
/*
* Author: Rocko, Ruthberg
* Pick up tripod
*
* Arguments:
* 0: unit <OBJECT>
* 1: tripod <OBJECT>
*
* Return Value:
* None
*
* Example:
* [ACE_player, tripod] call ace_tripod_fnc_pickup
*
* Public: No
*/
params ["_unit", "_tripod"];
if (stance _unit == "STAND") then {
[_unit, "AmovPercMstpSrasWrflDnon_diary"] call EFUNC(common,doAnimation);
};
[{
params ["_unit", "_tripod"];
if (isNull _tripod) exitWith {};
deleteVehicle _tripod;
[_unit, "ACE_Tripod"] call EFUNC(common,addToInventory);
}, [_unit, _tripod], 1] call CBA_fnc_waitAndExecute;