ACE3/addons/interaction/functions/fnc_addPassengersActions.sqf

43 lines
928 B
Plaintext

/*
* Author: CAA-Picard
* Create one action per passenger
* Note: This function is NOT global.
*
* Argument:
* 0: Vehicle <OBJECT>
* 1: Player <OBJECT>
* 3: Parameters <ARRAY>
*
* Return value:
* Children actions <ARRAY>
*
* Public: No
*/
#include "script_component.hpp"
EXPLODE_3_PVT(_this,_vehicle,_player,_parameters);
private ["_actions"];
_actions = [];
{
_unit = _x;
if (_x != _player) then {
_actions pushBack
[
[
str(_unit),
[_unit, true] call EFUNC(common,getName),
"",
{systemChat "selected passenger"},
{true},
{_this call FUNC(addPassengerActions);},
[_unit]
] call EFUNC(interact_menu,createAction),
[],
_unit
];
};
} forEach crew _vehicle;
_actions