ACE3/addons/medical/functions/fnc_actionUnloadUnit.sqf

27 lines
657 B
Plaintext
Raw Normal View History

#include "script_component.hpp"
2015-03-01 09:44:08 +00:00
/*
* Author: Glowbal
* Action for unloading an unconscious or dead unit from a vechile
*
* Arguments:
* 0: The medic <OBJECT>
* 1: The patient <OBJECT>
2015-08-22 14:25:10 +00:00
* 2: Drag after unload <BOOL> (default: false)
2015-03-01 09:44:08 +00:00
*
* Return Value:
2015-08-22 14:25:10 +00:00
* None
2015-03-01 09:44:08 +00:00
*
* Example:
* [bob, kevin, false] call ACE_medical_fnc_actionUnloadUnit
*
2015-03-01 09:44:08 +00:00
* Public: No
*/
2015-08-22 14:25:10 +00:00
params ["_caller", "_target", ["_drag", false]];
2015-03-01 09:44:08 +00:00
// cannot unload a unit not in a vehicle.
2015-11-30 16:14:05 +00:00
if (vehicle _target == _target) exitWith {};
if (([_target] call EFUNC(common,isAwake))) exitWith {};
2015-03-01 09:44:08 +00:00
2016-05-24 13:13:11 +00:00
["ace_unloadPersonEvent", [_target, vehicle _target, _caller], _target] call CBA_fnc_targetEvent;