ACE3/addons/medical/functions/fnc_addUnloadPatientActions.sqf

42 lines
983 B
Plaintext
Raw Normal View History

/*
2015-03-24 04:18:00 +00:00
* Author: esteldunedain
* Create one unload action per unconscious passenger
*
* Argument:
* 0: Vehicle <OBJECT>
* 1: Player <OBJECT>
* 3: Parameters <ARRAY>
*
* Return value:
* Children actions <ARRAY>
*
* Public: No
*/
#include "script_component.hpp"
2015-08-22 14:25:10 +00:00
params ["_vehicle", "_player", "_parameters"];
2015-04-30 06:17:26 +00:00
private ["_actions", "_unit"];
_actions = [];
{
_unit = _x;
if (_unit != _player && {(alive _unit) && {_unit getVariable ["ACE_isUnconscious", false]}}) then {
_actions pushBack
[
[
str(_unit),
[_unit, true] call EFUNC(common,getName),
"",
2015-08-22 14:25:10 +00:00
{[_player, _parameters select 0] call FUNC(actionUnloadUnit);},
{true},
{},
[_unit]
] call EFUNC(interact_menu,createAction),
[],
_unit
];
};
} forEach crew _vehicle;
_actions